<template>
  <div class="app-container">
  	<el-tabs v-model="activeName" type="card" @tab-click="handleClick">
      <el-tab-pane label="地图分布" name="first">
        <!--地图分布-->
        <SingleBuildingMap v-if="completeRefreshSingleBuilding" :allListData="allListData"
                           :showHideDivBool="showHideQueryDivBool"
                           @showHideQueryDiv="showHideQueryDiv"
                           :queryMapBool="queryMapBool"
                           @showQueryMapDraw="showQueryMapDraw"
                           :chartMapData="chartMapData"
                           :capacityLegendData="capacityLegendData"
        ></SingleBuildingMap>
        <!--查询面板-->
        <div v-if="showHideQueryDivBool" class="new-queryDiv">
          <div class="new-queryDiv-inner">
            <el-form :model="newQueryParams" label-position="right" label-width="82px">
              <el-form-item label="省" prop="province">
                <el-select v-model="newQueryParams.province" placeholder="请选择" @change="newChooseProvince" clearable value-key="name">
                  <el-option v-for="item in provinceData" :key="item.id" :label="item.name" :value="item">
                  </el-option>
                </el-select>
              </el-form-item>
              <el-form-item label="市" prop="city">
                <el-select v-model="newQueryParams.city" placeholder="请选择" @change="newChooseCity" clearable value-key="name">
                  <el-option v-for="item in cityData" :key="item.id" :label="item.name" :value="item">
                  </el-option>
                </el-select>
              </el-form-item>
              <el-form-item label="区/县" prop="county">
                <el-select v-model="newQueryParams.county" placeholder="请选择" @change="newChooseCounty" clearable value-key="name">
                  <el-option v-for="item in areaData" :key="item.id" :label="item.name" :value="item">
                  </el-option>
                </el-select>
              </el-form-item>
            </el-form>
            <div class="new-queryBtnDiv">
              <el-button @click="queryChartsView" type="primary">查询统计</el-button>
            </div>
            <div class="new-queryMapBtnDiv">
              <el-button @click="queryMapClick" type="primary">地图圈选统计</el-button>
            </div>
            <div class="new-closeBtnDiv">
              <el-button plain @click="showHideQueryDiv(false)">关闭</el-button>
            </div>
          </div>
        </div>
        <!--空间统计图表-->
        <ChartsView :chartViewQueryParams="chartViewQueryParams"
                    @hideChartView="hideChartView"
                    @showChartMapData="showChartMapData"
        ></ChartsView>
        <!--抗震能力分布图层图例-->
        <div v-if="showSeismicCapacityDistributionBool==true" class="new-capacityLegendDiv">
          <div style="text-align: center;">
            <span style="font-size: 14px;font-weight: bold;color: rgb(16, 124, 229);">图例</span>
          </div>
          <div style="text-align: center;height: 20px;">
            <span style="font-size: 14px;font-weight: bold;color: rgb(16, 124, 229);">建筑物综合抗震能力</span>
          </div>
          <template v-for="item in capacityLegendData" :key="item">
            <div>
              <div><div style="border-color:gray;" :style="{'background-color': item.color}" class="new-legendDiv-polygon"></div></div>
              <span>{{ item.name }}</span>
            </div>
          </template>
        </div>
      </el-tab-pane>
	    <el-tab-pane label="数据列表" name="second">
	    	<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="100px">
		      <el-form-item label="任务名称" prop="taskName">
		        <el-input
		          v-model="queryParams.taskName"
		          placeholder="请输入任务名称"
		          clearable
		          @keyup.enter="handleQuery"
		        />
		      </el-form-item>
		      <el-form-item label="建筑编号" prop="buildCode">
		        <el-input
		          v-model="queryParams.buildCode"
		          placeholder="请输入建筑编号"
		          clearable
		          @keyup.enter="handleQuery"
		        />
		      </el-form-item>
		      <el-form-item label="省" prop="provinceId">		        
		        <el-select v-model="queryParams.provinceId" placeholder="请选择省" @change="chooseProvince" clearable>
               <el-option
	                v-for="item in provinceData"
	                :key="item.id"
	                :label="item.name"
	                :value="item.id">
                </el-option>
            </el-select>
		      </el-form-item>
		      <el-form-item label="市" prop="cityId">
		        <el-select v-model="queryParams.cityId" placeholder="请选择市" @change="chooseCity" clearable>
               <el-option
	                v-for="item in cityData"
	                :key="item.id"
	                :label="item.name"
	                :value="item.id">
                </el-option>
            </el-select>
		      </el-form-item>
		      <el-form-item label="区/县" prop="countyId">
		        <el-select v-model="queryParams.countyId" placeholder="请选择区/县" clearable>
               <el-option
	                v-for="item in areaData"
	                :key="item.id"
	                :label="item.name"
	                :value="item.id">
                </el-option>
            </el-select>
		      </el-form-item>
		      <el-form-item label="建筑地点-乡" prop="country">
		        <el-input
		          v-model="queryParams.country"
		          placeholder="请输入建筑地点-乡"
		          clearable
		          @keyup.enter="handleQuery"
		        />
		      </el-form-item>
		      <el-form-item label="提交人" prop="submitter">
		        <el-input
		          v-model="queryParams.submitter"
		          placeholder="请输入提交人"
		          clearable
		          @keyup.enter="handleQuery"
		        />
		      </el-form-item>
		      <el-form-item label="提交时间" style="width: 312px">
		        <el-date-picker
		           v-model="submitTime"
		           value-format="YYYY-MM-DD"
		           type="daterange"
		           range-separator="-"
		           start-placeholder="开始日期"
		           end-placeholder="结束日期"
		        ></el-date-picker>
					</el-form-item>
		      <!--<el-form-item label="提交时间" prop="submitTime">
		        <el-date-picker clearable
		          v-model="queryParams.submitTime"
		          type="date"
		          value-format="YYYY-MM-DD"
		          placeholder="请选择提交时间">
		        </el-date-picker>
		      </el-form-item>-->
		      <el-form-item>
		        <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
		        <el-button plain icon="Refresh" @click="resetQuery">重置</el-button>
		      </el-form-item>
		    </el-form>
		
		    <el-row :gutter="10" class="mb8">
		      <!--<el-col :span="1.5">
		        <el-button
		          type="danger"
		          plain
		          icon="Delete"
		          :disabled="multiple"
		          @click="handleDelete"
		        >删除</el-button>
		      </el-col>-->
		      <el-col :span="1.5">
            <el-button plain icon="Download" @click="handleImport">导入</el-button>
        	</el-col>
        	<el-col :span="1.5">
	          <el-button plain icon="Edit" @click="handleExport">导出</el-button>
	        </el-col>
        	<el-col :span="1.5">
	          <el-button plain icon="Delete" @click="batchDelete" :disabled="ids.length==0">批量删除</el-button>
	        </el-col>
		      <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
		    </el-row>
		
		    <el-table v-loading="loading" stripe :data="singleList" @selection-change="handleSelectionChange" row-key="id" >
		      <el-table-column type="selection" width="55" align="center" :selectable="selectable" reserve-selection />
		      <el-table-column label="任务名称" align="center" prop="taskName" />
		      <el-table-column label="建筑编号" align="center" prop="buildCode" />
		      <el-table-column label="建筑地点-省" align="center" prop="province" />
		      <el-table-column label="建筑地点-市" align="center" prop="city" />
		      <el-table-column label="建筑地点-区/县" align="center" prop="county" />
		      <el-table-column label="建筑地点-乡" align="center" prop="country" />
		      <el-table-column label="建筑结构" align="center" prop="buildingStructure">
		      	<template #default="scope">
		          <span v-if="scope.row.buildingStructure=='0'">高层建筑</span>
		          <span v-if="scope.row.buildingStructure=='1'">钢结构</span>
		          <span v-if="scope.row.buildingStructure=='2'">多层钢筋混凝土结构</span>
		          <span v-if="scope.row.buildingStructure=='3'">砖混结构</span>
		          <span v-if="scope.row.buildingStructure=='4'">砖木结构</span>
		          <span v-if="scope.row.buildingStructure=='5'">土结构</span>
		          <span v-if="scope.row.buildingStructure=='6'">木结构</span>
		          <span v-if="scope.row.buildingStructure=='7'">石结构</span>
		          <span v-if="scope.row.buildingStructure=='8'">其他结构</span>
		        </template>
		      </el-table-column>
		      <el-table-column label="提交人" align="center" prop="submitter" />
		      <el-table-column label="提交时间" align="center" prop="submitTime" width="180">
		        <template #default="scope">
		          <span>{{ parseTime(scope.row.submitTime, '{y}-{m}-{d}') }}</span>
		        </template>
		      </el-table-column>
		      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
		        <template #default="scope">
		          <el-button
		            type="text"
		            @click="handleUpdate(scope.row)"
		            v-if="scope.row.taskStatus!=2 && scope.row.flag==2"
		          >修改</el-button>
		          <!--<el-button
		            type="text"
		            @click="handleUpdate(scope.row)"
		          >修改</el-button>-->
		          <el-button
		            type="text"
		            @click="handleView(scope.row)"
		            v-if="scope.row.flag==1 || scope.row.flag==2"
		          >查看</el-button>
		          <el-button
		            type="text"
		            @click="handleDelete(scope.row)"
		            v-if="scope.row.taskStatus!=2 && scope.row.flag==2"
		          >删除</el-button>
		        </template>
		      </el-table-column>
		    </el-table>
		    
		    <pagination
		      v-show="total>0"
		      :total="total"
		      v-model:page="queryParams.page"
		      v-model:limit="queryParams.rows"
		      @pagination="getList"
		    />
		
		    <!-- 添加或修改建筑物单体对话框 -->
		    <el-dialog :title="title" v-model="open" width="1000px" append-to-body @close="cancel">
		    	<p class="dialogTitle">{{title}}</p>
		      <el-form ref="singleRef" :model="form" :rules="rules" label-width="180px">
		        <el-row :gutter="20">
		        	<el-col :span="12">
				        <el-form-item label="任务编号" prop="taskCode">
				          <el-input v-model="form.taskCode" placeholder="请输入任务编号" :disabled="isEdit"/>
				        </el-form-item>
				      </el-col>
				      <el-col :span="12">
				        <el-form-item label="任务名称" prop="taskName">
				          <el-input v-model="form.taskName" placeholder="请输入任务名称" :disabled="isEdit"/>
				        </el-form-item>
				      </el-col>				      
			      </el-row>
			      <el-row :gutter="20">
			      	<el-col :span="12">
				        <el-form-item label="所属调查点" prop="fieldSurveyName">
				        	<el-select v-model="form.fieldSurveyId" placeholder="请选择所属调查点" @change="fieldSurveyChange" clearable style="width: 100%;">
			               <el-option
				                v-for="item in fieldSurveyNameData"
				                :key="item.id"
				                :label="item.fieldSurveyName"
				                :value="item.id">
			                </el-option>
			           </el-select>
				        </el-form-item>
				      </el-col>
		        	<el-col :span="12">
				        <el-form-item label="建筑编号" prop="buildCode">
				          <el-input v-model="form.buildCode" placeholder="请输入建筑编号" :disabled="isEdit"/>
				        </el-form-item>
		        	</el-col>
				      
			      </el-row>
			      <el-row :gutter="20">
			      	<el-col :span="12">
				        <el-form-item label="建筑地点-省" prop="province">		          
				          <el-select v-model="form.province" placeholder="请输入建筑地点-省" @change="chooseProvince" :disabled="isEdit" style="width: 100%;">
		               <el-option
			                v-for="item in provinceData"
			                :key="item.id"
			                :label="item.name"
			                :value="item.id">
		                </el-option>
		            	</el-select>
				        </el-form-item>
		        	</el-col>
		        	<el-col :span="12">
				        <el-form-item label="建筑地点-市" prop="city">
				          <el-select v-model="form.city" placeholder="请输入建筑地点-市" @change="chooseCity" :disabled="isEdit" style="width: 100%;">
		               <el-option
			                v-for="item in cityData"
			                :key="item.id"
			                :label="item.name"
			                :value="item.id">
		                </el-option>
		            	</el-select>
				        </el-form-item>
		        	</el-col>
			      </el-row>
			      <el-row :gutter="20">
			      	<el-col :span="12">
				        <el-form-item label="建筑地点-区/县" prop="county">
				          <el-select v-model="form.county" placeholder="请输入建筑地点-区/县" :disabled="isEdit" style="width: 100%;">
			               <el-option
				                v-for="item in areaData"
				                :key="item.id"
				                :label="item.name"
				                :value="item.id">
			                </el-option>
			            </el-select>
				        </el-form-item>
		        	</el-col>
		        	<el-col :span="12">
				        <el-form-item label="建筑地点-乡" prop="country">
				          <el-input v-model="form.country" placeholder="请输入建筑地点-乡" />
				        </el-form-item>
			        </el-col>
			      </el-row>
			      <el-row :gutter="20">
			      	<el-col :span="12">
				        <el-form-item label="经度" prop="longitude">
				          <el-input v-model="form.longitude" placeholder="请输入经度" />
				        </el-form-item>
			        </el-col>
			      	<el-col :span="12">
				        <el-form-item label="纬度" prop="latitude">
				          <el-input v-model="form.latitude" placeholder="请输入纬度" />
				        </el-form-item>
			        </el-col>
			      </el-row>
			      <el-row :gutter="20">
			      	<el-col :span="12">
				        <el-form-item label="设防烈度" prop="intensity">
				        	<el-select v-model="form.intensity" placeholder="请输入设防烈度" clearable style="width: 100%;">
			               <el-option
				                v-for="item in intensityData"
				                :key="item.dictItemCode"
				                :label="item.dictItemName"
				                :value="item.dictItemName">
			                </el-option>
			           </el-select>
				        </el-form-item>
				      </el-col>
			      	<el-col :span="12">
				        <el-form-item label="建造年代" prop="buildYears">
				          <el-select v-model="form.buildYears" placeholder="请输入建造年代" clearable style="width: 100%;">
			               <el-option
				                v-for="item in buildYearsData"
				                :key="item.dictItemCode"
				                :label="item.dictItemName"
				                :value="item.dictItemName">
			                </el-option>
			           </el-select>
				        </el-form-item>
				      </el-col>
			      </el-row>
			      <el-row :gutter="20">
			      	<el-col :span="12">
				        <el-form-item label="用途" prop="purpose">
				          <el-input v-model="form.purpose" placeholder="请输入用途" />
				        </el-form-item>
				      </el-col>
			      	<el-col :span="12">
				        <el-form-item label="层数" prop="layerNum">
				          <el-input v-model="form.layerNum" placeholder="请输入层数" />
				        </el-form-item>
		        	</el-col>
			      </el-row>
			      <el-row :gutter="20">
			      	<el-col :span="12">
				        <el-form-item label="高度（m）" prop="height">
				          <el-input v-model="form.height" placeholder="请输入高度" />
				        </el-form-item>
				    	</el-col>
			      	<el-col :span="12">
				        <el-form-item label="地形条件（山体滑坡、山崩危险）" prop="terrainConditions">
				          <el-select v-model="form.terrainConditions" placeholder="请输入地形条件" clearable style="width: 100%;">
			               <el-option
				                v-for="item in terrainConditionsData"
				                :key="item.dictItemCode"
				                :label="item.dictItemName"
				                :value="item.dictItemName">
			                </el-option>
			           	</el-select>
				        </el-form-item>
		        	</el-col>
			      </el-row>
			      <el-row :gutter="20">
			      	<el-col :span="12">
				        <el-form-item label="地基情况（下部软弱土层）" prop="foundationCondition">
				          <el-select v-model="form.foundationCondition" placeholder="请输入地基情况" clearable style="width: 100%;">
			               <el-option
				                v-for="item in foundationConditionData"
				                :key="item.dictItemCode"
				                :label="item.dictItemName"
				                :value="item.dictItemName">
			                </el-option>
			           	</el-select>
				        </el-form-item>
				      </el-col>
			      	<el-col :span="12">
				        <el-form-item label="平面型规则" prop="planarRule">
				          <el-select v-model="form.planarRule" placeholder="请输入平面型规则" clearable style="width: 100%;">
			               <el-option
				                v-for="item in planarRuleData"
				                :key="item.dictItemCode"
				                :label="item.dictItemName"
				                :value="item.dictItemName">
			                </el-option>
			           	</el-select>
				        </el-form-item>
		        	</el-col>
			      	
			      </el-row>
			      <el-row :gutter="20">
			      	<el-col :span="12">
				        <el-form-item label="竖向规则性" prop="verticalRule">
				          <el-select v-model="form.verticalRule" placeholder="请输入竖向规则性" clearable style="width: 100%;">
			               <el-option
				                v-for="item in verticalRuleData"
				                :key="item.dictItemCode"
				                :label="item.dictItemName"
				                :value="item.dictItemName">
			                </el-option>
			           	</el-select>
				        </el-form-item>
		        	</el-col>
		        	<el-col :span="12">
				        <el-form-item label="出屋面构件" prop="roofComponent">
				          <el-select v-model="form.roofComponent" placeholder="请输入出屋面构件" @change="chooseRoofComponent" clearable style="width: 100%;">
			               <el-option
				                v-for="item in roofComponentData"
				                :key="item.dictItemCode"
				                :label="item.dictItemName"
				                :value="item.dictItemName">
			                </el-option>
			           	</el-select>
				        </el-form-item>
				      </el-col>
              <el-col :span="12" v-if="isShowRoofComponentOther">
                  <el-form-item label="出屋面构件其他" prop="roofComponentOther">
                      <el-input v-model="form.roofComponentOther" placeholder="请输入出屋面构件其他" />
                  </el-form-item>
              </el-col>
			      </el-row>
	          <el-row :gutter="20">
              <el-col :span="12">
	              <el-form-item label="房屋状况" prop="housingCondition">
	                  <el-select v-model="form.housingCondition" placeholder="请输入房屋状况" clearable style="width: 100%;">
	                      <el-option
	                      v-for="item in housingConditionData"
	                      :key="item.dictItemCode"
	                      :label="item.dictItemName"
	                      :value="item.dictItemName">
	                      </el-option>
	                  </el-select>
	              </el-form-item>
              </el-col>
              <el-col :span="12">
				        <el-form-item label="程度描述" prop="degreeDescription">
				          <el-input v-model="form.degreeDescription" placeholder="请输入程度描述" />
				        </el-form-item>
				      </el-col>
	          </el-row>
			      <el-row :gutter="20">		        	
			      	<el-col :span="12">
				        <el-form-item label="建筑结构" prop="buildingStructure">
				          <el-select v-model="form.buildingStructure" placeholder="请输入建筑结构" @change="chooseStructure" clearable style="width: 100%;">
			               <el-option
				                v-for="item in buildingStructureData"
				                :key="item.dictItemCode"
				                :label="item.dictItemName"
				                :value="item.dictItemCode">
			                </el-option>
			           	</el-select>
				        </el-form-item>
				      </el-col>
				      <el-col :span="12">
				        <el-form-item label="抗震能力" prop="seismicCapacity">
				          <el-select v-model="form.seismicCapacity" placeholder="请输入抗震能力" clearable style="width: 100%;">
			               <el-option
				                v-for="item in seismicCapacityData"
				                :key="item.dictItemCode"
				                :label="item.dictItemName"
				                :value="item.dictItemName">
			                </el-option>
			           	</el-select>
				        </el-form-item>
				      </el-col>
			      </el-row>
			      <el-row :gutter="20">
			      	<el-col :span="24">
				        <el-form-item label="备注" prop="remarks">
				          <el-input v-model="form.remarks" type="textarea" maxlength="100" show-word-limit :autosize="{ minRows: 3, maxRows: 5}" placeholder="请输入备注" />
				        </el-form-item>
				      </el-col>
			      </el-row>
		        <el-form-item label="图片" prop="picture">
							<el-input type="hidden" />
		          <image-upload ref="imageUpload" :disabled="isEditFile" :isShowCheckIMg="isShowCheckIMg" v-model="form.pictureList" :checkedPicList="form.specifyPicture" @uploadSuccess="imgUploadSuccess"></image-upload>	
							<p style="position: absolute;bottom: -5px;right: 0;" v-if="!isEditFile && form.pictureList.length>0">
								<el-button plain @click="selectImg">{{isShowCheckIMg ? '确定':'指定典型结构房屋图片'}}</el-button>
							</p>
		        </el-form-item>
		        <el-row :gutter="20">
		        	<el-col :span="12">
				        <el-form-item label="提交人" prop="submitter">
				          <el-input v-model="form.submitter" placeholder="请输入提交人" :disabled="isEdit"/>
				        </el-form-item>
				      </el-col>
				      <el-col :span="12">
				        <el-form-item label="提交时间" prop="submitTime">
				          <el-date-picker clearable
				            v-model="form.submitTime"
				            type="date"
				            :disabled="isEdit"
				            value-format="YYYY-MM-DD"
				            placeholder="请选择提交时间"
				            style="width: 100%;"
				            >
				          </el-date-picker>
				        </el-form-item>
				      </el-col>
			      </el-row>
		        <el-form-item label="结构类型" prop="highStructureType" v-if="high">		 
		          <el-select v-model="form.highStructureType" placeholder="请输入结构类型" clearable style="width: 100%;">
	               <el-option
		                v-for="item in highStructureTypeData"
		                :key="item.dictItemCode"
		                :label="item.dictItemName"
		                :value="item.dictItemName">
	                </el-option>
	           	</el-select>
		        </el-form-item>
              <el-row :gutter="20">
                <el-col :span="12">
                    <el-form-item label="结构类型" prop="steelStructureType" v-if="steel">
                      <el-select v-model="form.steelStructureType" placeholder="请输入结构类型" @change="chooseSteelStructureType" clearable style="width: 100%;">
                       <el-option
                            v-for="item in steelStructureTypeData"
                            :key="item.dictItemCode"
                            :label="item.dictItemName"
                            :value="item.dictItemName">
                        </el-option>
                    </el-select>
                    </el-form-item>
                </el-col>
                  <el-col :span="12" v-if="steel && isShowSteelStructureTypeOther">
                      <el-form-item label="结构类型其他" prop="steelStructureTypeOther" >
                          <el-input v-model="form.steelStructureTypeOther" placeholder="请输入结构类型其他" />
                      </el-form-item>
                  </el-col>
              </el-row>
		        <!--<el-form-item label="填表人" prop="preparer">
		          <el-input v-model="form.preparer" placeholder="请输入填表人" />
		        </el-form-item>
		        <el-form-item label="填表日期" prop="fillingTime">
		          <el-input v-model="form.fillingTime" placeholder="请输入填表日期" />
		        </el-form-item>-->
		        <el-row :gutter="20">
		        	<el-col :span="12">
				        <el-form-item label="填充墙与柱连接方式" prop="hntConnectionType" v-if="multilayer">
				          <el-select v-model="form.hntConnectionType" placeholder="请输入填充墙与柱连接方式" clearable style="width: 100%;">
			               <el-option
				                v-for="item in hntConnectionTypeData"
				                :key="item.dictItemCode"
				                :label="item.dictItemName"
				                :value="item.dictItemName">
			                </el-option>
			           	</el-select>
				        </el-form-item>
				      </el-col>
				      <el-col :span="12">
				        <el-form-item label="楼梯间位置（是否在近端或转角）" prop="hntStairsPosition" v-if="multilayer">
				          <el-select v-model="form.hntStairsPosition" placeholder="请输入楼梯间位置" clearable style="width: 100%;">
			               <el-option
				                v-for="item in hntStairsPositionData"
				                :key="item.dictItemCode"
				                :label="item.dictItemName"
				                :value="item.dictItemName">
			                </el-option>
			           	</el-select>
				        </el-form-item>
				      </el-col>
			      </el-row>
			      <el-row :gutter="20">
		        	<el-col :span="12">
				        <el-form-item label="主要柱截面尺寸" prop="hntColumnSectionSize" v-if="multilayer">
				          <el-input v-model="form.hntColumnSectionSize" placeholder="请输入主要柱截面尺寸" />
				        </el-form-item>
				      </el-col>
				      <el-col :span="12">
				        <el-form-item label="多层主要梁截面尺寸" prop="hntBeamSectionSize" v-if="multilayer">
				          <el-input v-model="form.hntBeamSectionSize" placeholder="请输入主要梁截面尺寸" />
				        </el-form-item>
				      </el-col>
			      </el-row>
			      <el-row :gutter="20">
		        	<el-col :span="12">
				        <el-form-item label="薄弱环节" prop="hntWeakLink" v-if="multilayer">
				          <el-select v-model="form.hntWeakLink" placeholder="请输入薄弱环节" clearable style="width: 100%;">
			               <el-option
				                v-for="item in hntWeakLinkData"
				                :key="item.dictItemCode"
				                :label="item.dictItemName"
				                :value="item.dictItemName">
			                </el-option>
			           	</el-select>
				        </el-form-item>
			        </el-col>
				      <el-col :span="12">
				        <el-form-item label="最大柱间距(m)" prop="hntMaxColumnCpacing" v-if="multilayer">
				          <el-input v-model="form.hntMaxColumnCpacing" placeholder="请输入最大柱间距(m)" />
				        </el-form-item>
				      </el-col>
			      </el-row>
			      <el-row :gutter="20">
		        	<el-col :span="12">
				        <el-form-item label="最大层高(m)" prop="hntMaximumFloorHeight" v-if="multilayer">
				          <el-input v-model="form.hntMaximumFloorHeight" placeholder="请输入最大层高(m)" />
				        </el-form-item>
			        </el-col>
				      <el-col :span="12">
				        <el-form-item label="梁最大跨度(m)" prop="hntMaxSpanSeam" v-if="multilayer">
				          <el-input v-model="form.hntMaxSpanSeam" placeholder="请输入梁最大跨度(m)" />
				        </el-form-item>
				      </el-col>
			      </el-row>
			      <el-row :gutter="20">
		        	<el-col :span="12">
				        <el-form-item label="楼盖类型" prop="zhFloorType" v-if="brick">
				          <el-select v-model="form.zhFloorType" placeholder="请输入楼盖类型" @change="chooseZhFloorType" clearable style="width: 100%;">
			               <el-option
				                v-for="item in zhFloorTypeData"
				                :key="item.dictItemCode"
				                :label="item.dictItemName"
				                :value="item.dictItemName">
			                </el-option>
			           	</el-select>
				        </el-form-item>
				      </el-col>
				      <el-col :span="24" v-if="brick && isShowZhFloorTypeOther">
							  <el-form-item label="楼盖类型其他" prop="zhFloorTypeOther" >
								  <el-input v-model="form.zhFloorTypeOther" placeholder="请输入楼盖类型其他" />
							  </el-form-item>
						  </el-col>
				      <el-col :span="12">
				        <el-form-item label="屋盖类型" prop="zhRoofType" v-if="brick">
				          <el-select v-model="form.zhRoofType" placeholder="请输入屋盖类型" @change="chooseZhRoofType" clearable style="width: 100%;">
			               <el-option
				                v-for="item in zhRoofTypeData"
				                :key="item.dictItemCode"
				                :label="item.dictItemName"
				                :value="item.dictItemName">
			                </el-option>
			           	</el-select>
				        </el-form-item>
				      </el-col>
				      <el-col :span="24" v-if="brick && isShowZhRoofTypeOther">
							  <el-form-item label="屋盖类型其他" prop="zhRoofTypeOther" >
								  <el-input v-model="form.zhRoofTypeOther" placeholder="请输入屋盖类型其他" />
							  </el-form-item>
						  </el-col>
			      </el-row>
			      <el-row :gutter="20">
		        	<el-col :span="12">
				        <el-form-item label="墙体材料" prop="zhWallMaterials" v-if="brick">
				          <el-select v-model="form.zhWallMaterials" placeholder="请输入墙体材料" clearable style="width: 100%;">
			               <el-option
				                v-for="item in zhWallMaterialsData"
				                :key="item.dictItemCode"
				                :label="item.dictItemName"
				                :value="item.dictItemName">
			                </el-option>
			           	</el-select>
				        </el-form-item>
				      </el-col>
				      <el-col :span="12">
				        <el-form-item label="墙体厚度-内墙（mm）" prop="zhWallThicknessInterior" v-if="brick">
				          <el-input v-model="form.zhWallThicknessInterior" placeholder="请输入墙体厚度-内墙" />
				        </el-form-item>
				      </el-col>
			      </el-row>
			      <el-row :gutter="20">
		        	<el-col :span="12">
				        <el-form-item label="墙体厚度-外墙（mm）" prop="zhWallThicknessExterior" v-if="brick">
				          <el-input v-model="form.zhWallThicknessExterior" placeholder="请输入墙体厚度-外墙" />
				        </el-form-item>
				      </el-col>
				      <el-col :span="12">
				        <el-form-item label="砂浆类别" prop="zhMortarType" v-if="brick">
				          <el-select v-model="form.zhMortarType" placeholder="请输入砂浆类别" clearable style="width: 100%;">
			               <el-option
				                v-for="item in zhMortarTypeData"
				                :key="item.dictItemCode"
				                :label="item.dictItemName"
				                :value="item.dictItemName">
			                </el-option>
			           	</el-select>
				        </el-form-item>
				      </el-col>
			      </el-row>
			      <el-row :gutter="20">
		        	<el-col :span="12">
				        <el-form-item label="砂浆强度" prop="zhMortarStrength" v-if="brick">
				          <el-select v-model="form.zhMortarStrength" placeholder="请输入砂浆强度" clearable style="width: 100%;">
			               <el-option
				                v-for="item in zhMortarStrengthData"
				                :key="item.dictItemCode"
				                :label="item.dictItemName"
				                :value="item.dictItemName">
			                </el-option>
			           	</el-select>
				        </el-form-item>
			        </el-col>
				      <el-col :span="12">
				        <el-form-item label="承重体系" prop="zhBearingSystem" v-if="brick">
				          <el-select v-model="form.zhBearingSystem" placeholder="请输入承重体系" clearable style="width: 100%;">
			               <el-option
				                v-for="item in zhBearingSystemData"
				                :key="item.dictItemCode"
				                :label="item.dictItemName"
				                :value="item.dictItemName">
			                </el-option>
			           	</el-select>
				        </el-form-item>
				      </el-col>
			      </el-row>
			      <el-row :gutter="20">
		        	<el-col :span="12">
				        <el-form-item label="承重墙砌筑方式" prop="zhBearingMode" v-if="brick">
				          <el-select v-model="form.zhBearingMode" placeholder="请输入承重墙砌筑方式" clearable style="width: 100%;">
			               <el-option
				                v-for="item in zhBearingModeData"
				                :key="item.dictItemCode"
				                :label="item.dictItemName"
				                :value="item.dictItemName">
			                </el-option>
			           	</el-select>
				        </el-form-item>
				      </el-col>
				      <el-col :span="12">
				        <el-form-item label="楼梯间位置（是否在近端或转角）" prop="zhStaircaseLocation" v-if="brick">
				          <el-select v-model="form.zhStaircaseLocation" placeholder="请输入楼梯间位置" clearable style="width: 100%;">
			               <el-option
				                v-for="item in zhStaircaseLocationData"
				                :key="item.dictItemCode"
				                :label="item.dictItemName"
				                :value="item.dictItemName">
			                </el-option>
			           	</el-select>
				        </el-form-item>
				      </el-col>
			      </el-row>
			      <el-row :gutter="20">
		        	<el-col :span="12">
				        <el-form-item label="大洞窗,转角窗" prop="zhHoleCrner" v-if="brick">
				          <el-select v-model="form.zhHoleCrner" placeholder="请输入大洞窗,转角窗" clearable style="width: 100%;">
			               	<el-option
				                v-for="item in zhHoleCrnerData"
				                :key="item.dictItemCode"
				                :label="item.dictItemName"
				                :value="item.dictItemName">
			                </el-option>
			           	</el-select>
				        </el-form-item>
				      </el-col>
				      <el-col :span="12">
				        <el-form-item label="构造柱" prop="zhStructuralColumn" v-if="brick">
				          <el-select v-model="form.zhStructuralColumn" placeholder="请输入构造柱" @change="chooseZhStructuralColumn" clearable style="width: 100%;">
			               	<el-option
				                v-for="item in zhStructuralColumnData"
				                :key="item.dictItemCode"
				                :label="item.dictItemName"
				                :value="item.dictItemName">
			                </el-option>
			           	</el-select>
				        </el-form-item>
				      </el-col>
			      </el-row>
				  <el-row :gutter="20">
					  <el-col :span="24" v-if="brick && isShowZhStructuralColumnOther">
						  <el-form-item label="构造柱其他" prop="zhStructuralColumnOther" >
							  <el-input v-model="form.zhStructuralColumnOther" placeholder="请输入构造柱其他" />
						  </el-form-item>
					  </el-col>
				  </el-row>
			      <el-row :gutter="20">
		        	<el-col :span="12">
				        <el-form-item label="圈梁" prop="zhRingBeam" v-if="brick">
				          <el-select v-model="form.zhRingBeam" placeholder="请输入圈梁" @change="chooseZhRingBeam" clearable style="width: 100%;">
		               	<el-option
			                v-for="item in zhRingBeamData"
			                :key="item.dictItemCode"
			                :label="item.dictItemName"
			                :value="item.dictItemName">
		                </el-option>
			           	</el-select>
				        </el-form-item>
				      </el-col>
					  <el-col :span="12" v-if="brick && isShowZhRingBeamOther">
						  <el-form-item label="圈梁其他" prop="zhRingBeamOther">
							  <el-input v-model="form.zhRingBeamOther" placeholder="请输入圈梁其他" />
						  </el-form-item>
					  </el-col>
			      </el-row>
			      <el-row :gutter="20">
		        	<el-col :span="12">
				        <el-form-item label="屋盖类型" prop="zmRoofType" v-if="brickWood">		          
				          <el-select v-model="form.zmRoofType" placeholder="请输入屋盖类型" @change="chooseZmRoofType" clearable style="width: 100%;">
		               	<el-option
			                v-for="item in zmRoofTypeData"
			                :key="item.dictItemCode"
			                :label="item.dictItemName"
			                :value="item.dictItemName">
		                </el-option>
			           	</el-select>
				        </el-form-item>
			        </el-col>
					  <el-col :span="24" v-if="brickWood && isShowZmRoofTypeOther">
						  <el-form-item label="屋盖类型其他" prop="zmRoofTypeOther" >
							  <el-input v-model="form.zmRoofTypeOther" placeholder="请输入屋盖类型其他" />
						  </el-form-item>
					  </el-col>
				      <el-col :span="12">
				        <el-form-item label="墙体材料" prop="zmWallMaterials" v-if="brickWood">
				          <el-select v-model="form.zmWallMaterials" placeholder="请输入墙体材料" clearable style="width: 100%;">
		               	<el-option
			                v-for="item in zmWallMaterialsData"
			                :key="item.dictItemCode"
			                :label="item.dictItemName"
			                :value="item.dictItemName">
		                </el-option>
			           	</el-select>
				        </el-form-item>
				      </el-col>
			      </el-row>
			      <el-row :gutter="20">
		        	<el-col :span="12">
				        <el-form-item label="砂浆" prop="zmMortar" v-if="brickWood">
				          <el-select v-model="form.zmMortar" placeholder="请输入砂浆" clearable style="width: 100%;">
		               	<el-option
			                v-for="item in zmMortarData"
			                :key="item.dictItemCode"
			                :label="item.dictItemName"
			                :value="item.dictItemName">
		                </el-option>
			           	</el-select>
				        </el-form-item>
			        </el-col>
				      <el-col :span="12">				      	
				        <el-form-item label="承重体系" prop="zmBearingSystem" v-if="brickWood">
				          <el-select v-model="form.zmBearingSystem" placeholder="请输入承重体系" clearable style="width: 100%;">
		               	<el-option
			                v-for="item in zmBearingSystemData"
			                :key="item.dictItemCode"
			                :label="item.dictItemName"
			                :value="item.dictItemName">
		                </el-option>
			           	</el-select>
				        </el-form-item>
				      </el-col>
			      </el-row>
			      <el-row :gutter="20">
		        	<el-col :span="12">
				        <el-form-item label="横墙开洞面积（水平全截面面积1/3）" prop="zmWallOpeningArea" v-if="brickWood">
				          <el-select v-model="form.zmWallOpeningArea" placeholder="请输入横墙开洞面积" clearable style="width: 100%;">
		               	<el-option
			                v-for="item in zmWallOpeningAreaData"
			                :key="item.dictItemCode"
			                :label="item.dictItemName"
			                :value="item.dictItemName">
		                </el-option>
			           	</el-select>
				        </el-form-item>
				      </el-col>
				      <el-col :span="12">
				        <el-form-item label="构造柱" prop="zmStructuralColumn" v-if="brickWood">
				          <el-select v-model="form.zmStructuralColumn" placeholder="请输入构造柱" @change="chooseZmStructuralColumn" clearable style="width: 100%;">
		               	<el-option
			                v-for="item in zmStructuralColumnData"
			                :key="item.dictItemCode"
			                :label="item.dictItemName"
			                :value="item.dictItemName">
		                </el-option>
			           	</el-select>
				        </el-form-item>
				      </el-col>
			      </el-row>
				  <el-row :gutter="20">
					  <el-col :span="24" v-if="brickWood && isShowZmStructuralColumnOther">
						  <el-form-item label="构造柱其他" prop="zmStructuralColumnOther">
							  <el-input v-model="form.zmStructuralColumnOther" placeholder="请输入构造柱其他" clearable style="width: 100%;" />
						  </el-form-item>
					  </el-col>
				  </el-row>
			      <el-row :gutter="20">
		        	<el-col :span="12">
					  <el-form-item label="圈梁" prop="zmRingBeam" v-if="brickWood">
						  <el-select v-model="form.zmRingBeam" placeholder="请输入圈梁" @change="chooseZmRingBeam" clearable style="width: 100%;">
							  <el-option
									  v-for="item in zmRingBeamData"
									  :key="item.dictItemCode"
									  :label="item.dictItemName"
									  :value="item.dictItemName">
							  </el-option>
						  </el-select>
					  </el-form-item>
				  	</el-col>
						<el-col :span="12" v-if="brickWood && isShowZmRingBeamOther">
						  <el-form-item label="圈梁其他" prop="zmRingBeamOther">
							  <el-input v-model="form.zmRingBeamOther" placeholder="请输入圈梁其他" clearable style="width: 100%;" />
						  </el-form-item>
						</el-col>
			      </el-row>
			      <el-row :gutter="20">
		        	<el-col :span="12">
				        <el-form-item label="硬山搁檀" prop="soilHardMountain" v-if="soil">
				          <el-select v-model="form.soilHardMountain" placeholder="请输入硬山搁檀" clearable style="width: 100%;">
		               	<el-option
			                v-for="item in soilHardMountainData"
			                :key="item.dictItemCode"
			                :label="item.dictItemName"
			                :value="item.dictItemName">
		                </el-option>
			           	</el-select>
				        </el-form-item>
				      </el-col>
				      <el-col :span="12">
				        <el-form-item label="墙体" prop="soilWall" v-if="soil">
				          <el-select v-model="form.soilWall" placeholder="请输入墙体" clearable style="width: 100%;">
		               	<el-option
			                v-for="item in soilWallData"
			                :key="item.dictItemCode"
			                :label="item.dictItemName"
			                :value="item.dictItemName">
		                </el-option>
			           	</el-select>
				        </el-form-item>
				      </el-col>
			      </el-row>
			      <el-row :gutter="20">
		        	<el-col :span="12">
				        <el-form-item label="墙体建筑方式" prop="soilModeType" v-if="soil">
				          <el-select v-model="form.soilModeType" placeholder="请输入墙体建筑方式" @change="chooseSoilModeType" clearable style="width: 100%;">
		               	<el-option
			                v-for="item in soilModeTypeData"
			                :key="item.dictItemCode"
			                :label="item.dictItemName"
			                :value="item.dictItemName">
		                </el-option>
			           	</el-select>
				        </el-form-item>
				      </el-col>
				      <el-col :span="12" v-if="soil && isShowSoilModeTypeOther">
							  <el-form-item label="墙体建筑方式其他" prop="soilModeTypeOther">
								  <el-input v-model="form.soilModeTypeOther" placeholder="请输入墙体建筑方式其他" clearable style="width: 100%;" />
							  </el-form-item>
							</el-col>
				      <el-col :span="12">
				        <el-form-item label="墙体圈梁" prop="soilWallRingBeam" v-if="soil">
				          <el-select v-model="form.soilWallRingBeam" placeholder="请输入墙体圈梁" clearable style="width: 100%;">
		               	<el-option
			                v-for="item in soilWallRingBeamData"
			                :key="item.dictItemCode"
			                :label="item.dictItemName"
			                :value="item.dictItemName">
		                </el-option>
			           	</el-select>
				        </el-form-item>
				      </el-col>
			      </el-row>
			      <el-row :gutter="20">
		        	<el-col :span="12">
				        <el-form-item label="墙体延性材料" prop="soilWallDuctileMaterial" v-if="soil">
				          <el-select v-model="form.soilWallDuctileMaterial" placeholder="请输入墙体延性材料" clearable style="width: 100%;">
		               	<el-option
			                v-for="item in soilWallDuctileMaterialData"
			                :key="item.dictItemCode"
			                :label="item.dictItemName"
			                :value="item.dictItemName">
		                </el-option>
			           	</el-select>
				        </el-form-item>
				      </el-col>
				      <el-col :span="12">
				        <el-form-item label="门窗洞口宽度" prop="soilDoorWindowWidth" v-if="soil">
				          <el-select v-model="form.soilDoorWindowWidth" placeholder="请输入门窗洞口宽度" clearable style="width: 100%;">
		               	<el-option
			                v-for="item in soilDoorWindowWidthData"
			                :key="item.dictItemCode"
			                :label="item.dictItemName"
			                :value="item.dictItemName">
		                </el-option>
			           	</el-select>
				        </el-form-item>
				      </el-col>
			      </el-row>
			      <el-row :gutter="20">
		        	<el-col :span="12">
				        <el-form-item label="承重墙最大间距" prop="soilMaxSpacing" v-if="soil">
				          <el-select v-model="form.soilMaxSpacing" placeholder="请输入承重墙最大间距" clearable style="width: 100%;">
		               	<el-option
			                v-for="item in soilMaxSpacingData"
			                :key="item.dictItemCode"
			                :label="item.dictItemName"
			                :value="item.dictItemName">
		                </el-option>
			           	</el-select>
				        </el-form-item>
				      </el-col>
				      <el-col :span="12">
				        <el-form-item label="屋面形式" prop="soilRoofForm" v-if="soil">
				          <el-select v-model="form.soilRoofForm" placeholder="请输入屋面形式" clearable style="width: 100%;">
		               	<el-option
			                v-for="item in soilRoofFormData"
			                :key="item.dictItemCode"
			                :label="item.dictItemName"
			                :value="item.dictItemName">
		                </el-option>
			           	</el-select>
				        </el-form-item>
				      </el-col>
			      </el-row>
			      <el-row :gutter="20">
		        	<el-col :span="12">
				        <el-form-item label="屋面材料" prop="soilRoofingMaterials" v-if="soil">
				          <el-select v-model="form.soilRoofingMaterials" placeholder="请输入屋面材料" clearable style="width: 100%;">
		               	<el-option
			                v-for="item in soilRoofingMaterialsData"
			                :key="item.dictItemCode"
			                :label="item.dictItemName"
			                :value="item.dictItemName">
		                </el-option>
			           	</el-select>
				        </el-form-item>
				      </el-col>
				      <el-col :span="12">
				        <el-form-item label="屋楼盖拉结措施" prop="soilRoofTyingMeasures" v-if="soil">
				          <el-select v-model="form.soilRoofTyingMeasures" placeholder="请输入屋楼盖拉结措施" clearable style="width: 100%;">
		               	<el-option
			                v-for="item in soilRoofTyingMeasuresData"
			                :key="item.dictItemCode"
			                :label="item.dictItemName"
			                :value="item.dictItemName">
		                </el-option>
			           	</el-select>
				        </el-form-item>
				      </el-col>
			      </el-row>
			      <el-row :gutter="20">
		        	<el-col :span="12">
				        <el-form-item label="结构类型" prop="woodStructureType" v-if="wood">
				          <el-select v-model="form.woodStructureType" placeholder="请输入柱间支撑" clearable style="width: 100%;">
		               	<el-option
			                v-for="item in woodStructureTypeData"
			                :key="item.dictItemCode"
			                :label="item.dictItemName"
			                :value="item.dictItemName">
		                </el-option>
			           	</el-select>
				        </el-form-item>
				      </el-col>
				      <el-col :span="12">
				        <el-form-item label="柱间支撑" prop="woodColumnsBracing" v-if="wood">
				          <el-select v-model="form.woodColumnsBracing" placeholder="请输入柱间支撑" clearable style="width: 100%;">
		               	<el-option
			                v-for="item in woodColumnsBracingData"
			                :key="item.dictItemCode"
			                :label="item.dictItemName"
			                :value="item.dictItemName">
		                </el-option>
			           	</el-select>
				        </el-form-item>
				      </el-col>
			      </el-row>
			      <el-row :gutter="20">
		        	<el-col :span="12">
				        <el-form-item label="木柱接长处" prop="woodColumnExtension" v-if="wood">
				          <el-select v-model="form.woodColumnExtension" placeholder="请输入木柱接长处" clearable style="width: 100%;">
		               	<el-option
			                v-for="item in woodColumnExtensionData"
			                :key="item.dictItemCode"
			                :label="item.dictItemName"
			                :value="item.dictItemName">
		                </el-option>
			           	</el-select>
				        </el-form-item>
				      </el-col>
				      <el-col :span="12">
				        <el-form-item label="节点" prop="woodNode" v-if="wood">
				          <el-select v-model="form.woodNode" placeholder="请输入节点" clearable style="width: 100%;">
		               	<el-option
			                v-for="item in woodNodeData"
			                :key="item.dictItemCode"
			                :label="item.dictItemName"
			                :value="item.dictItemName">
		                </el-option>
			           	</el-select>
				        </el-form-item>
				      </el-col>
			      </el-row>
			      <el-row :gutter="20">
		        	<el-col :span="12">
				        <el-form-item label="木径梢径" prop="woodTipDiameter" v-if="wood">
				          <el-select v-model="form.woodTipDiameter" placeholder="请输入木径梢径" clearable style="width: 100%;">
		               	<el-option
			                v-for="item in woodTipDiameterData"
			                :key="item.dictItemCode"
			                :label="item.dictItemName"
			                :value="item.dictItemName">
		                </el-option>
			           	</el-select>
				        </el-form-item>
				      </el-col>
				      <el-col :span="12">
				        <el-form-item label="柱脚与基础锚固" prop="woodFoundationAnchoring" v-if="wood">
				          <el-select v-model="form.woodFoundationAnchoring" placeholder="请输入柱脚与基础锚固" clearable style="width: 100%;">
		               	<el-option
			                v-for="item in woodFoundationAnchoringData"
			                :key="item.dictItemCode"
			                :label="item.dictItemName"
			                :value="item.dictItemName">
		                </el-option>
			           	</el-select>
				        </el-form-item>
				      </el-col>
			      </el-row>
			      <el-row :gutter="20">
		        	<el-col :span="12">
				        <el-form-item label="山尖墙" prop="woodGableWall" v-if="wood">
				          <el-select v-model="form.woodGableWall" placeholder="请输入山尖墙" clearable style="width: 100%;">
		               	<el-option
			                v-for="item in woodGableWallData"
			                :key="item.dictItemCode"
			                :label="item.dictItemName"
			                :value="item.dictItemName">
		                </el-option>
			           	</el-select>
				        </el-form-item>
				      </el-col>
				      <el-col :span="12">
				        <el-form-item label="围护墙" prop="woodEnclosureWall" v-if="wood">
				          <el-select v-model="form.woodEnclosureWall" placeholder="请输入围护墙" clearable style="width: 100%;">
		               	<el-option
			                v-for="item in woodEnclosureWallData"
			                :key="item.dictItemCode"
			                :label="item.dictItemName"
			                :value="item.dictItemName">
		                </el-option>
			           	</el-select>
				        </el-form-item>
				      </el-col>
			      </el-row>
			      <el-row :gutter="20">
		        	<el-col :span="12">
				        <el-form-item label="墙体连接" prop="woodWallConnection" v-if="wood">
				          <el-select v-model="form.woodWallConnection" placeholder="请输入墙体连接" clearable style="width: 100%;">
		               	<el-option
			                v-for="item in woodWallConnectionData"
			                :key="item.dictItemCode"
			                :label="item.dictItemName"
			                :value="item.dictItemName">
		                </el-option>
			           	</el-select>
				        </el-form-item>
				      </el-col>
			      </el-row>
			      <el-row :gutter="20">
		        	<el-col :span="12">
				        <el-form-item label="墙体材料" prop="stoneWallMaterials" v-if="stone">
				          <el-select v-model="form.stoneWallMaterials" placeholder="请输入墙体材料" @change="chooseWallMaterials" clearable style="width: 100%;">
		               	<el-option
			                v-for="item in stoneWallMaterialsData"
			                :key="item.dictItemCode"
			                :label="item.dictItemName"
			                :value="item.dictItemName">
		                </el-option>
			           	</el-select>
				        </el-form-item>
				      </el-col>
				      <el-col :span="24" v-if="isShowMaterialsOther">
				        <el-form-item label="墙体材料其他" prop="stoneWallMaterialsOther" >
				          <el-input v-model="form.stoneWallMaterialsOther" placeholder="请输入墙体材料其他" />
				        </el-form-item>
				      </el-col>
				      <el-col :span="12">
				        <el-form-item label="承重方式" prop="stoneLoadMode" v-if="stone">
				          <el-select v-model="form.stoneLoadMode" placeholder="请输入承重方式" clearable style="width: 100%;">
		               	<el-option
			                v-for="item in stoneLoadModeData"
			                :key="item.dictItemCode"
			                :label="item.dictItemName"
			                :value="item.dictItemName">
		                </el-option>
			           	</el-select>
				        </el-form-item>
				      </el-col>
			      </el-row>
			      <el-row :gutter="20">
		        	<el-col :span="12">
				        <el-form-item label="上下楼层结构类型" prop="stoneFloorStructure" v-if="stone">
				          <el-select v-model="form.stoneFloorStructure" placeholder="请输入上下楼层结构类型" clearable style="width: 100%;">
		               	<el-option
			                v-for="item in stoneFloorStructureData"
			                :key="item.dictItemCode"
			                :label="item.dictItemName"
			                :value="item.dictItemName">
		                </el-option>
			           	</el-select>
				        </el-form-item>
			        </el-col>
				      <el-col :span="12">
				        <el-form-item label="楼屋盖类型" prop="stoneRoofType" v-if="stone">
				          <el-select v-model="form.stoneRoofType" placeholder="请输入楼屋盖类型" @change="chooseRoofType" clearable style="width: 100%;">
		               	<el-option
			                v-for="item in stoneRoofTypeData"
			                :key="item.dictItemCode"
			                :label="item.dictItemName"
			                :value="item.dictItemName">
		                </el-option>
			           	</el-select>
				        </el-form-item>
				      </el-col>
				      <el-col :span="24" v-if="isShowRoofType">
				        <el-form-item label="楼屋盖类型其他" prop="stoneRoofTypeOther" >
				          <el-input v-model="form.stoneRoofTypeOther" placeholder="请输入楼屋盖类型其他" />
				        </el-form-item>
				      </el-col>
			      </el-row>
			      <el-row :gutter="20">
		        	<el-col :span="12">
				        <el-form-item label="横墙最大间距" prop="stoneMaximumSpacing" v-if="stone">
				          <el-input v-model="form.stoneMaximumSpacing" placeholder="请输入横墙最大间距" />
				        </el-form-item>
				      </el-col>
				      <el-col :span="12">
				        <el-form-item label="横墙开洞面积" prop="stoneWallOpeningArea" v-if="stone">
				          <el-select v-model="form.stoneWallOpeningArea" placeholder="请输入横墙开洞面积" clearable style="width: 100%;">
		               	<el-option
			                v-for="item in stoneWallOpeningAreaData"
			                :key="item.dictItemCode"
			                :label="item.dictItemName"
			                :value="item.dictItemName">
		                </el-option>
			           	</el-select>
				        </el-form-item>
				      </el-col>
			      </el-row>
			      <el-row :gutter="20">
		        	<el-col :span="12">
				        <el-form-item label="纵横墙连接" prop="stoneWallConnection" v-if="stone">
				          <el-select v-model="form.stoneWallConnection" placeholder="请输入纵横墙连接" clearable style="width: 100%;">
		               	<el-option
			                v-for="item in stoneWallConnectionData"
			                :key="item.dictItemCode"
			                :label="item.dictItemName"
			                :value="item.dictItemName">
		                </el-option>
			           	</el-select>
				        </el-form-item>
				      </el-col>
				      <el-col :span="12">
				        <el-form-item label="圈梁" prop="stoneRingBeam" v-if="stone">
				          <el-select v-model="form.stoneRingBeam" placeholder="请输入圈梁" clearable style="width: 100%;">
		               	<el-option
			                v-for="item in stoneRingBeamData"
			                :key="item.dictItemCode"
			                :label="item.dictItemName"
			                :value="item.dictItemName">
		                </el-option>
			           	</el-select>
				        </el-form-item>
				      </el-col>
			      </el-row>
			      <el-row :gutter="20">
		        	<el-col :span="12">
				        <el-form-item label="四角构造柱" prop="stoneFourStructural" v-if="stone">
				          <el-select v-model="form.stoneFourStructural" placeholder="请输入四角构造柱" clearable style="width: 100%;">
		               	<el-option
			                v-for="item in stoneFourStructuralData"
			                :key="item.dictItemCode"
			                :label="item.dictItemName"
			                :value="item.dictItemName">
		                </el-option>
			           	</el-select>
				        </el-form-item>
				      </el-col>
			      </el-row>
		        <!--<el-form-item label="提交状态" prop="isSubmit">
		          <el-input v-model="form.isSubmit" placeholder="请输入提交状态" />
		        </el-form-item>
		        <el-form-item label="删除标识 0未删除 1已删除" prop="delFlag">
		          <el-input v-model="form.delFlag" placeholder="请输入删除标识 0未删除 1已删除" />
		        </el-form-item>
		        <el-form-item label="创建人" prop="createUser">
		          <el-input v-model="form.createUser" placeholder="请输入创建人" />
		        </el-form-item>-->
		        
		      </el-form>
		      <template #footer>
		        <div class="dialog-footer">
		          <el-button type="primary" @click="submitForm" v-show="isShow">确 定</el-button>
		          <el-button plain @click="cancel">取 消</el-button>
		        </div>
		      </template>
		    </el-dialog>
		    <!-- 导入对话框 -->
        <el-dialog :title="upload.title" v-model="upload.open" width="400px" append-to-body>
          <p></p>
           <el-upload
              ref="uploadRef"
              :limit="1"
              accept=".xlsx"
              :headers="upload.headers"
              :action="upload.url"
              :disabled="upload.isUploading"
              :before-upload="handleFileBeforeUpload"
              :on-progress="handleFileUploadProgress"
              :on-error="handleFileUploadError"
              :on-success="handleFileSuccess"
              :auto-upload="false"
              drag
           >
              <el-icon class="el-icon--upload"><upload-filled /></el-icon>
              <div class="el-upload__text">将文件拖到此处，或<em>点击上传</em></div>
              <template #tip>
                 <div class="el-upload__tip text-center">
                    <span>仅允许导入xlsx格式文件。</span>
                    <el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;" @click="importTemplate('建筑物单体数据模板.xlsx')">下载模板</el-link>
                 </div>
              </template>
           </el-upload>
           <template #footer>
              <div class="dialog-footer">
                 <el-button type="primary" @click="submitFileForm">确 定</el-button>
                 <el-button plain @click="upload.open = false">取 消</el-button>
              </div>
           </template>
        </el-dialog>
	    </el-tab-pane>
  	</el-tabs>
  </div>
</template>

<script setup name="singleBuilding">
//地图
import SingleBuildingMap from '@/map/basedatamanage/singleBuilding/map.vue';
import ChartsView from '@/views/basedatamanage/spaceData/chartsView.vue';
import { listSingle, getSingle, delSingle, addSingle, updateSingle, mapAllListBuilding, getSampling } from "@/api/basedatamanage/single";
import { getProvince, getChildArea} from "@/api/system/division";
import { getDict } from "@/api/system/dict";
import { getToken } from "@/utils/auth";
import { ElLoading } from 'element-plus'

const { proxy } = getCurrentInstance();

/*** 导入参数 */
const upload = reactive({
  open: false,
  title: "",
  isUploading: false,
  headers: { token: "token " + getToken() },
  url: import.meta.env.VITE_APP_BASE_API + "/building/uploadBuilding"
});

const singleList = ref([]);
const open = ref(false);
const loading = ref(true);
const showSearch = ref(true);
const ids = ref([]);
const id = ref(true);
const isEdit = ref(true)
const isEditFile = ref(false);
const isShow = ref(true);
const single = ref(true);
const multiple = ref(true);
const isShowZhStructuralColumnOther = ref(false);
const isShowZhRingBeamOther = ref(false);
const isShowMaterialsOther = ref(false);
const isShowZmRoofTypeOther = ref(false);
const isShowZmStructuralColumnOther = ref(false);
const isShowZmRingBeamOther = ref(false);
const isShowRoofType = ref(false);
const isShowRoofComponentOther = ref(false);
const isShowSteelStructureTypeOther = ref(false);
const isShowZhFloorTypeOther = ref(false);
const isShowZhRoofTypeOther = ref(false);
const isShowSoilModeTypeOther = ref(false);
const total = ref(0);
const title = ref("");
const submitTime = ref([]);
const activeName = ref("first");
const high = ref(false);//高层
const steel = ref(false);//钢
const multilayer = ref(false);//多层
const brick = ref(false);//砖混
const brickWood = ref(false);//砖木
const soil = ref(false);//土
const wood = ref(false);//木
const stone = ref(false);//石
const provinceData = ref([]);//省
const cityData = ref([]);//市
const areaData = ref([]);//区、县
const fieldSurveyNameData = ref([]);//所属调查点
const intensityData = ref([]);//设防烈度
const buildYearsData = ref([]);//建造年代
const terrainConditionsData = ref([]);//地形条件
const foundationConditionData = ref([]);//地基情况
const planarRuleData = ref([]);//平面型规则
const verticalRuleData = ref([]);//竖向规则性
const roofComponentData = ref([]);//出屋面构件
const housingConditionData = ref([]);//房屋状况
const buildingStructureData = ref([]);//建筑结构
const seismicCapacityData = ref([]);//抗震能力
const highStructureTypeData = ref([]);//结构类型  高层
const steelStructureTypeData = ref([]);//结构类型  钢
const hntConnectionTypeData = ref([]);//填充墙与柱连接方式
const hntStairsPositionData = ref([]);//楼梯间位置
const hntWeakLinkData = ref([]);//薄弱环节
const zhFloorTypeData = ref([]);//楼盖类型
const zhRoofTypeData = ref([]);//屋盖类型
const zhWallMaterialsData = ref([]);//墙体材料
const zhMortarTypeData = ref([]);//砂浆类别
const zhMortarStrengthData = ref([]);//砂浆强度
const zhBearingSystemData = ref([]);//承重体系
const zhBearingModeData = ref([]);//承重墙砌筑方式
const zhStaircaseLocationData = ref([]);//楼梯间位置
const zhHoleCrnerData = ref([]);//大洞窗,转角窗
const zhStructuralColumnData = ref([]);//构造柱
const zhRingBeamData = ref([]);//圈梁
const zmRoofTypeData = ref([]);//屋盖类型

const zmWallMaterialsData = ref([]);//墙体材料
const zmMortarData = ref([]);//砂浆
const zmBearingSystemData = ref([]);//承重体系
const zmWallOpeningAreaData = ref([]);//横墙开洞面积
const zmStructuralColumnData = ref([]);//构造柱
const zmRingBeamData = ref([]);//圈梁
const soilHardMountainData = ref([]);//硬山搁檀
const soilWallData = ref([]);//墙体
const soilModeTypeData = ref([]);//墙体建筑方式
const soilWallRingBeamData = ref([]);//墙体圈梁
const soilWallDuctileMaterialData = ref([]);//墙体延性材料
const soilDoorWindowWidthData = ref([]);//门窗洞口宽度
const soilMaxSpacingData = ref([]);//承重墙最大间距
const soilRoofFormData = ref([]);//屋面形式
const soilRoofingMaterialsData = ref([]);//屋面材料
const soilRoofTyingMeasuresData = ref([]);//屋楼盖拉结措施
const woodStructureTypeData = ref([]);//结构类型
const woodColumnsBracingData = ref([]);//柱间支撑
const woodColumnExtensionData = ref([]);//木柱接长处
const woodNodeData = ref([]);//节点
const woodTipDiameterData = ref([]);//木径梢径
const woodFoundationAnchoringData = ref([]);//柱脚与基础锚固
const woodGableWallData = ref([]);//山尖墙
const woodEnclosureWallData = ref([]);//围护墙
const woodWallConnectionData = ref([]);//墙体连接
const stoneWallMaterialsData = ref([]);//墙体材料
const stoneLoadModeData = ref([]);//承重方式
const stoneFloorStructureData = ref([]);//上下楼层结构类型
const stoneRoofTypeData = ref([]);//楼屋盖类型
const stoneWallOpeningAreaData = ref([]);//横墙开洞面积
const stoneWallConnectionData = ref([]);//纵横墙连接
const stoneRingBeamData = ref([]);//圈梁
const stoneFourStructuralData = ref([]);//四角构造柱

const data = reactive({
  form: {pictureList: []},
  queryParams: {
    type: '0',
    page: 1,
    rows: 10,
    taskName: null,
    buildCode: null,
    provinceId: null,
    cityId: null,
    countyId: null,
    country: null,
    buildingStructure: null,
    submitter: null,
    startTime:null,
    endTime:null,
  },
  rules: {
  	taskCode: [
      { required: true, message: "任务编号不能为空", trigger: "blur" }
    ],
    taskName: [
      { required: true, message: "任务名称不能为空", trigger: "blur" }
    ],
    fieldSurveyName: [
      { required: true, message: "所属调查点不能为空", trigger: "blur" }
    ],
    buildCode: [
      { required: true, message: "建筑编号不能为空", trigger: "blur" }
    ],
    province: [
      { required: true, message: "建筑地点-省不能为空", trigger: "blur" }
    ],
    city: [
      { required: true, message: "建筑地点-市不能为空", trigger: "blur" }
    ],
    county: [
      { required: true, message: "建筑地点-区/县不能为空", trigger: "blur" }
    ],
    country: [
      { required: true, message: "建筑地点-乡不能为空", trigger: "blur" }
    ],
    longitude: [
      { required: true, message: "经度不能为空", trigger: "blur" }
    ],
    latitude: [
      { required: true, message: "纬度不能为空", trigger: "blur" }
    ],
    intensity: [
      { required: true, message: "设防烈度不能为空", trigger: "change" }
    ],
    buildYears: [
      { required: true, message: "建造年代不能为空", trigger: "change" }
    ],
    purpose: [
      { required: true, message: "用途不能为空", trigger: "blur" }
    ],
    layerNum: [
      { required: true, message: "层数不能为空", trigger: "blur" }
    ],
    height: [
      { required: true, message: "高度不能为空", trigger: "blur" }
    ],
    terrainConditions: [
      { required: true, message: "地形条件不能为空", trigger: "change" }
    ],
    foundationCondition: [
      { required: true, message: "地基情况不能为空", trigger: "change" }
    ],
    planarRule: [
      { required: true, message: "平面型规则不能为空", trigger: "change" }
    ],
    verticalRule: [
      { required: true, message: "竖向规则性不能为空", trigger: "change" }
    ],
    roofComponent: [
      { required: true, message: "出屋面构件不能为空", trigger: "change" }
    ],
    roofComponentOther: [
          { required: true, message: "出屋面构件其他不能为空", trigger: "blur" }
    ],
    housingCondition: [
      { required: true, message: "房屋状况不能为空", trigger: "change" }
    ],
    degreeDescription: [
      { required: true, message: "程度描述不能为空", trigger: "blur" }
    ],
    buildingStructure: [
      { required: true, message: "建筑结构不能为空", trigger: "change" }
    ],
    seismicCapacity: [
      { required: true, message: "抗震能力不能为空", trigger: "change" }
    ],
    picture: [
      { required: true, message: "图片不能为空", trigger: "change" }
    ],
    submitter: [
      { required: true, message: "提交人不能为空", trigger: "blur" }
    ],
    submitTime: [
      { required: true, message: "提交时间不能为空", trigger: "blur" }
    ],
    highStructureType: [
      { required: true, message: "结构类型不能为空", trigger: "change" }
    ],
    steelStructureType: [
      { required: true, message: "结构类型不能为空", trigger: "change" }
    ],
    steelStructureTypeOther: [
        { required: true, message: "结构类型其他不能为空", trigger: "blur" }
    ],
    hntConnectionType: [
      { required: true, message: "填充墙与柱连接方式不能为空", trigger: "change" }
    ],
    hntStairsPosition: [
      { required: true, message: "楼梯间位置不能为空", trigger: "change" }
    ],
    hntColumnSectionSize: [
      { required: true, message: "主要柱截面尺寸不能为空", trigger: "blur" }
    ],
    hntBeamSectionSize: [
      { required: true, message: "多层主要梁截面尺寸不能为空", trigger: "blur" }
    ],
    hntWeakLink: [
      { required: true, message: "薄弱环节不能为空", trigger: "change" }
    ],
    hntMaxColumnCpacing: [
      { required: true, message: "最大柱间距(m)不能为空", trigger: "blur" }
    ],
    hntMaximumFloorHeight: [
      { required: true, message: "最大层高(m)不能为空", trigger: "blur" }
    ],
    hntMaxSpanSeam: [
      { required: true, message: "梁最大跨度(m)不能为空", trigger: "blur" }
    ],
    zhFloorType: [
      { required: true, message: "楼盖类型不能为空", trigger: "change" }
    ],
    zhFloorTypeOther: [
      { required: true, message: "楼盖类型其他不能为空", trigger: "blur" }
    ],
    zhRoofType: [
      { required: true, message: "屋盖类型不能为空", trigger: "change" }
    ],
    zhRoofTypeOther: [
      { required: true, message: "屋盖类型其他不能为空", trigger: "blur" }
    ],
    zhWallMaterials: [
      { required: true, message: "墙体材料不能为空", trigger: "change" }
    ],
    zhWallThicknessInterior: [
      { required: true, message: "墙体厚度-内墙不能为空", trigger: "blur" }
    ],
    zhWallThicknessExterior: [
      { required: true, message: "墙体厚度-外墙不能为空", trigger: "blur" }
    ],
    zhMortarType: [
      { required: true, message: "砂浆类别不能为空", trigger: "change" }
    ],
    zhMortarStrength: [
      { required: true, message: "砂浆强度不能为空", trigger: "change" }
    ],
    zhBearingSystem: [
      { required: true, message: "承重体系不能为空", trigger: "change" }
    ],
    zhBearingMode: [
      { required: true, message: "承重墙砌筑方式不能为空", trigger: "change" }
    ],
    zhStaircaseLocation: [
      { required: true, message: "楼梯间位置不能为空", trigger: "change" }
    ],
    zhHoleCrner: [
      { required: true, message: "大洞窗,转角窗不能为空", trigger: "change" }
    ],
    zhStructuralColumn: [
      { required: true, message: "构造柱不能为空", trigger: "change" }
    ],
    zhStructuralColumnOther: [
		  { required: true, message: "构造柱其他不能为空", trigger: "blur" }
  	],
    zhRingBeam: [
      { required: true, message: "圈梁不能为空", trigger: "change" }
    ],
  	zhRingBeamOther: [
      { required: true, message: "圈梁其他不能为空", trigger: "blur" }
    ],
    zmRoofType: [
      { required: true, message: "屋盖类型不能为空", trigger: "change" }
    ],
    zmRoofTypeOther: [
      { required: true, message: "屋盖类型其他不能为空", trigger: "blur" }
    ],
    zmWallMaterials: [
      { required: true, message: "墙体材料不能为空", trigger: "change" }
    ],
    zmMortar: [
      { required: true, message: "砂浆不能为空", trigger: "change" }
    ],
    zmBearingSystem: [
      { required: true, message: "承重体系不能为空", trigger: "change" }
    ],
    zmWallOpeningArea: [
      { required: true, message: "横墙开洞面积不能为空", trigger: "change" }
    ],
    zmStructuralColumn: [
      { required: true, message: "构造柱不能为空", trigger: "change" }
    ],
  	zmStructuralColumnOther: [
	  { required: true, message: "构造柱其他不能为空", trigger: "blur" }
  	],
    zmRingBeam: [
      { required: true, message: "圈梁不能为空", trigger: "change" }
    ],
    zmRingBeamOther: [
      { required: true, message: "圈梁其他不能为空", trigger: "blur" }
    ],
    soilHardMountain: [
      { required: true, message: "硬山搁檀不能为空", trigger: "change" }
    ],
    soilWall: [
      { required: true, message: "墙体不能为空", trigger: "change" }
    ],
    soilModeType: [
      { required: true, message: "墙体建筑方式不能为空", trigger: "change" }
    ],
    soilModeTypeOther: [
      { required: true, message: "墙体建筑方式其他不能为空", trigger: "blur" }
    ],
    soilWallRingBeam: [
      { required: true, message: "墙体圈梁不能为空", trigger: "change" }
    ],
    soilWallDuctileMaterial: [
      { required: true, message: "墙体延性材料不能为空", trigger: "change" }
    ],
    soilDoorWindowWidth: [
      { required: true, message: "门窗洞口宽度不能为空", trigger: "change" }
    ],
    soilMaxSpacing: [
      { required: true, message: "承重墙最大间距不能为空", trigger: "change" }
    ],
    soilRoofForm: [
      { required: true, message: "屋面形式不能为空", trigger: "change" }
    ],
    soilRoofingMaterials: [
      { required: true, message: "屋面材料不能为空", trigger: "change" }
    ],
    soilRoofTyingMeasures: [
      { required: true, message: "屋楼盖拉结措施不能为空", trigger: "change" }
    ],
    woodStructureType: [
      { required: true, message: "结构类型不能为空", trigger: "change" }
    ],
    woodColumnsBracing: [
      { required: true, message: "柱间支撑不能为空", trigger: "change" }
    ],
    woodColumnExtension: [
      { required: true, message: "木柱接长处不能为空", trigger: "change" }
    ],
    woodNode: [
      { required: true, message: "节点不能为空", trigger: "change" }
    ],
    woodTipDiameter: [
      { required: true, message: "木径梢径不能为空", trigger: "change" }
    ],
    woodFoundationAnchoring: [
      { required: true, message: "柱脚与基础锚固不能为空", trigger: "change" }
    ],
    woodGableWall: [
      { required: true, message: "山尖墙不能为空", trigger: "change" }
    ],
    woodEnclosureWall: [
      { required: true, message: "围护墙不能为空", trigger: "change" }
    ],
    woodWallConnection: [
      { required: true, message: "墙体连接不能为空", trigger: "change" }
    ],
    stoneWallMaterials: [
      { required: true, message: "墙体材料不能为空", trigger: "change" }
    ],
    stoneWallMaterialsOther: [
      { required: true, message: "墙体材料其他不能为空", trigger: "blur" }
    ],
    stoneLoadMode: [
      { required: true, message: "承重方式不能为空", trigger: "change" }
    ],
    stoneFloorStructure: [
      { required: true, message: "上下楼层结构类型不能为空", trigger: "change" }
    ],
    stoneRoofType: [
      { required: true, message: "楼屋盖类型不能为空", trigger: "change" }
    ],
    stoneRoofTypeOther: [
      { required: true, message: "楼屋盖类型其他不能为空", trigger: "blur" }
    ],
    stoneMaximumSpacing: [
      { required: true, message: "横墙最大间距不能为空", trigger: "blur" }
    ],
    stoneWallOpeningArea: [
      { required: true, message: "横墙开洞面积不能为空", trigger: "change" }
    ],
    stoneWallConnection: [
      { required: true, message: "纵横墙连接不能为空", trigger: "change" }
    ],
    stoneRingBeam: [
      { required: true, message: "圈梁不能为空", trigger: "change" }
    ],
    stoneFourStructural: [
      { required: true, message: "四角构造柱不能为空", trigger: "change" }
    ],
  },
  chartViewQueryParams: {//空间统计查询参数
    province: "",
    city: "",
    county: "",
    provinceId: "",
    cityId: "",
    countyId: "",
    dataType: "建筑物单体数据",//数据类型
    geomText: "",//地图圈选空间数据
    title:"",//显示空间统计标题
    showBool:false,//是否显示
  },
  newQueryParams: {
    province: "",
    city: "",
    county: "",
    provinceId: "",
    cityId: "",
    countyId: "",
    dataType: "建筑物单体数据",//数据类型
  },
});

const { queryParams, form, rules,chartViewQueryParams,newQueryParams } = toRefs(data);
// 所属调查点切换
const fieldSurveyChange = (val) => {
	form.value.fieldSurveyName = fieldSurveyNameData.value.find(item => item.id == val).fieldSurveyName

}
/** 获取字典值 */
function getDictData(row) {
	getSampling(row.taskCode).then(response => {
	    fieldSurveyNameData.value = response.data;
	});
	getDict("sfld").then(response => {
	    intensityData.value = response.data;
	});
	getDict("jznd").then(response => {
	    buildYearsData.value = response.data;
	});
	getDict("dxtj").then(response => {
	    terrainConditionsData.value = response.data;
	});
	getDict("djqk").then(response => {
	    foundationConditionData.value = response.data;
	});
	getDict("pmxgz").then(response => {
	    planarRuleData.value = response.data;
	});
	getDict("sxgzx").then(response => {
	    verticalRuleData.value = response.data;
	});
	getDict("cwmgj").then(response => {
	    roofComponentData.value = response.data;
	});
	getDict("fwzk").then(response => {
	    housingConditionData.value = response.data;
	});
	getDict("jzjg").then(response => {
	    buildingStructureData.value = response.data;
	});
	getDict("kznl").then(response => {
	    seismicCapacityData.value = response.data;
	});
	getDict("gcjzjgjglx").then(response => {
	    highStructureTypeData.value = response.data;
	});
	getDict("gjgjglx").then(response => {
	    steelStructureTypeData.value = response.data;
	});
	getDict("dchjhntjgtcqyzljfs").then(response => {
	    hntConnectionTypeData.value = response.data;
	});
	getDict("dchjhntjgltjwz").then(response => {
	    hntStairsPositionData.value = response.data;
	});
	getDict("dchjhntjgbrhj").then(response => {
	    hntWeakLinkData.value = response.data;
	});
	getDict("zhjglglx").then(response => {
	    zhFloorTypeData.value = response.data;
	});
	getDict("zhjgwglx").then(response => {
	    zhRoofTypeData.value = response.data;
	});
	getDict("zhjgqtcl").then(response => {
	    zhWallMaterialsData.value = response.data;
	});
	getDict("zhjgsjlb").then(response => {
	    zhMortarTypeData.value = response.data;
	});
	getDict("zhjgsjqd").then(response => {
	    zhMortarStrengthData.value = response.data;
	});
	getDict("zhjgcztx").then(response => {
	    zhBearingSystemData.value = response.data;
	});
	getDict("zhjgczqqzfs").then(response => {
	    zhBearingModeData.value = response.data;
	});
	getDict("zhjgltjwz").then(response => {
	    zhStaircaseLocationData.value = response.data;
	});
	getDict("zhjgddczjc").then(response => {
	    zhHoleCrnerData.value = response.data;
	});
	getDict("zhjggzz").then(response => {
	    zhStructuralColumnData.value = response.data;
	});
	getDict("zhjgql").then(response => {
	    zhRingBeamData.value = response.data;
	});
	getDict("zmjgwglx").then(response => {
	    zmRoofTypeData.value = response.data;
	});
	
	getDict("zmjgqtcl").then(response => {
	    zmWallMaterialsData.value = response.data;
	});
	getDict("zmjgsj").then(response => {
	    zmMortarData.value = response.data;
	});
	getDict("zmjgsctx").then(response => {
	    zmBearingSystemData.value = response.data;
	});
	getDict("zmjghqktmj").then(response => {
	    zmWallOpeningAreaData.value = response.data;
	});
	getDict("zmjggzz").then(response => {
	    zmStructuralColumnData.value = response.data;
	});
	getDict("zmjgql").then(response => {
	    zmRingBeamData.value = response.data;
	});
	getDict("tjgysgl").then(response => {
	    soilHardMountainData.value = response.data;
	});
	getDict("tjgqt").then(response => {
	    soilWallData.value = response.data;
	});
	getDict("tjgqtgjfs").then(response => {
	    soilModeTypeData.value = response.data;
	});
	getDict("tjgqtql").then(response => {
	    soilWallRingBeamData.value = response.data;
	});
	
	
	getDict("tjgqtyxcl").then(response => {
	    soilWallDuctileMaterialData.value = response.data;
	});
	getDict("tjgmcdkkd").then(response => {
	    soilDoorWindowWidthData.value = response.data;
	});
	getDict("tjgczqzdjj").then(response => {
	    soilMaxSpacingData.value = response.data;
	});
	getDict("tjgwmxs").then(response => {
	    soilRoofFormData.value = response.data;
	});
	getDict("tjgwmcl").then(response => {
	    soilRoofingMaterialsData.value = response.data;
	});
	getDict("tjgwlgljcs").then(response => {
	    soilRoofTyingMeasuresData.value = response.data;
	});
	getDict("mjgjglx").then(response => {
	    woodStructureTypeData.value = response.data;
	});
	
	getDict("mjgzjzc").then(response => {
	    woodColumnsBracingData.value = response.data;
	});
	getDict("mjgmzjcc").then(response => {
	    woodColumnExtensionData.value = response.data;
	});
	getDict("mjgjd").then(response => {
	    woodNodeData.value = response.data;
	});
	getDict("mjgmhsj").then(response => {
	    woodTipDiameterData.value = response.data;
	});
	getDict("mjgzjyjcmg").then(response => {
	    woodFoundationAnchoringData.value = response.data;
	});
	getDict("mjgsjq").then(response => {
	    woodGableWallData.value = response.data;
	});
	getDict("mjgwhq").then(response => {
	    woodEnclosureWallData.value = response.data;
	});
	
	getDict("sjgqtlj").then(response => {
	    woodWallConnectionData.value = response.data;
	});
	getDict("sjgqtcl").then(response => {
	    stoneWallMaterialsData.value = response.data;
	});
	getDict("sjgczfs").then(response => {
	    stoneLoadModeData.value = response.data;
	});
	getDict("sjgsxlcjglx").then(response => {
	    stoneFloorStructureData.value = response.data;
	});
	getDict("sjglwglx").then(response => {
	    stoneRoofTypeData.value = response.data;
	});
	getDict("sjghqkdmj").then(response => {
	    stoneWallOpeningAreaData.value = response.data;
	});
	getDict("sjgzhqlj").then(response => {
	    stoneWallConnectionData.value = response.data;
	});
	getDict("sjgql").then(response => {
	    stoneRingBeamData.value = response.data;
	});
	getDict("sjgsjgzz").then(response => {
	    stoneFourStructuralData.value = response.data;
	});
}

/** 获取省列表 */
function getProvinceData() {
	getProvince().then(response => {
	    provinceData.value = response.data;
	});
}

function chooseRoofComponent(value){
    if(value=="其他"){
        isShowRoofComponentOther.value = true;
    }else{
        isShowRoofComponentOther.value = false;
    }
}
function chooseSteelStructureType(value){
    if(value=="其他"){
        isShowSteelStructureTypeOther.value = true;
    }else{
        isShowSteelStructureTypeOther.value = false;
    }
}

function chooseZhFloorType(value){
    if(value=="其他"){
        isShowZhFloorTypeOther.value = true;
    }else{
        isShowZhFloorTypeOther.value = false;
    }
}

function chooseZhRoofType(value){
    if(value=="其他"){
        isShowZhRoofTypeOther.value = true;
    }else{
        isShowZhRoofTypeOther.value = false;
    }
}

function chooseZhStructuralColumn(value){
    if(value=="其他可填写"){
        isShowZhStructuralColumnOther.value = true;
    }else{
        isShowZhStructuralColumnOther.value = false;
    }
}

function chooseZhRingBeam(value){
    if(value=="其他可填写"){
        isShowZhRingBeamOther.value = true;
    }else{
        isShowZhRingBeamOther.value = false;
    }
}

function chooseWallMaterials(value){
	if(value=="其他可填写"){
		isShowMaterialsOther.value = true;
	}else{
		isShowMaterialsOther.value = false;
	}
}

function chooseZmRoofType(value){
    if(value=="其他可填写"){
        isShowZmRoofTypeOther.value = true;
    }else{
        isShowZmRoofTypeOther.value = false;
    }
}

function chooseZmStructuralColumn(value){
    if(value=="其他可填写"){
        isShowZmStructuralColumnOther.value = true;
    }else{
        isShowZmStructuralColumnOther.value = false;
    }
}

function chooseZmRingBeam(value){
    if(value=="其他可填写"){
        isShowZmRingBeamOther.value = true;
    }else{
        isShowZmRingBeamOther.value = false;
    }
}

function chooseSoilModeType(value){
    if(value=="其他"){
        isShowSoilModeTypeOther.value = true;
    }else{
        isShowSoilModeTypeOther.value = false;
    }
}


function chooseRoofType(value){
	if(value=="其他可填写"){
		isShowRoofType.value = true;
	}else{
		isShowRoofType.value = false;
	}
}

function chooseProvince(value){
	queryParams.value.cityId = null;
	queryParams.value.countyId = null;
	cityData.value = [];
	areaData.value = [];
	getChildArea(value).then(response => {
    cityData.value = response.data;
	});
//	provinceData.value.map(item => {//遍历数据
//		if(item.id == value){
//			if(item.name == "北京市"||item.name == "天津市"||item.name == "上海市"||item.name == "重庆市"){
//		    cityData.value.push(JSON.parse(JSON.stringify(item)));
//			}else{
//				getChildArea(value).then(response => {
//			    cityData.value = response.data;
//				});
//			}
//			return;
//		}   
//})		
}

function chooseCity(value){
	queryParams.value.countyId = null;
	areaData.value = [];
	getChildArea(value).then(response => {
	    areaData.value = response.data;
	});
}

//地图传参--start
const completeRefreshSingleBuilding = ref(false);//防止刷新后地图不显示
const allListData = ref([]);

const showHideQueryDivBool = ref(false);//是否显示查询面板
const showHideQueryDiv = (bool)=>{//显示|隐藏查询面板
  showHideQueryDivBool.value = bool;
  //清空查询参数
  clearQueryParams();
  //清空统计抗震能力地图显示结果
  showChartMapData(null);
  queryMapBool.value = false;//关闭地图圈选查询
}

//清空查询参数
function clearQueryParams(){
  newQueryParams.value.province = null;
  newQueryParams.value.city = null;
  newQueryParams.value.county = null;
  newQueryParams.value.provinceId = null;
  newQueryParams.value.cityId = null;
  newQueryParams.value.countyId = null;
  cityData.value = [];
  areaData.value = [];
}

//选择省
function newChooseProvince(value) {
  newQueryParams.value.city = null;
  newQueryParams.value.county = null;
  newQueryParams.value.province = value.name;
  newQueryParams.value.cityId = null;
  newQueryParams.value.countyId = null;
  newQueryParams.value.provinceId = value.id;
  cityData.value = [];
  areaData.value = [];
  getChildArea(value.id).then(response => {
    cityData.value = response.data;
  });
}
//选择市
function newChooseCity(value) {
  newQueryParams.value.city = value.name;
  newQueryParams.value.county = null;
  newQueryParams.value.cityId = value.id;
  newQueryParams.value.countyId = null;
  areaData.value = [];
  getChildArea(value.id).then((response) => {
    areaData.value = response.data;
  });
}
//选择区县
function newChooseCounty(value) {
  newQueryParams.value.county = value.name;
  newQueryParams.value.countyId = value.id;
}

//地图圈选查询
const showQueryMapDraw = (polygonWkt)=>{
  if(polygonWkt!=null && polygonWkt!=""){
    console.log("地图圈选查询");
    console.log(polygonWkt);
    //空间统计查询参数
    chartViewQueryParams.value.province = "";
    chartViewQueryParams.value.city = "";
    chartViewQueryParams.value.county = "";
    chartViewQueryParams.value.provinceId = "";
    chartViewQueryParams.value.cityId = "";
    chartViewQueryParams.value.countyId = "";
    chartViewQueryParams.value.geomText = polygonWkt;//地图圈选空间数据
    let title = "【" + chartViewQueryParams.value.dataType +"】";
    chartViewQueryParams.value.title = title + "地图圈选查询空间统计结果";//标题
    //显示空间统计
    chartViewQueryParams.value.showBool = true;
  }
}

//开启空间统计查询功能
const queryChartsView = ()=>{
  //空间统计查询参数
  chartViewQueryParams.value.province = newQueryParams.value.province;
  chartViewQueryParams.value.city = newQueryParams.value.city;
  chartViewQueryParams.value.county = newQueryParams.value.county;
  chartViewQueryParams.value.provinceId = newQueryParams.value.provinceId;
  chartViewQueryParams.value.cityId = newQueryParams.value.cityId;
  chartViewQueryParams.value.countyId = newQueryParams.value.countyId;
  chartViewQueryParams.value.dataType = newQueryParams.value.dataType;//数据类型
  chartViewQueryParams.value.geomText = "";//地图圈选空间数据
  let title = "";
  if(newQueryParams.value.province!=null){
    title += newQueryParams.value.province;
  }
  if(newQueryParams.value.city!=null){
    title += newQueryParams.value.city;
  }
  if(newQueryParams.value.county!=null){
    title += newQueryParams.value.county;
  }
  title += "【" + newQueryParams.value.dataType +"】";
  chartViewQueryParams.value.title = title + "查询空间统计结果";//标题
  //显示空间统计
  chartViewQueryParams.value.showBool = true;
  queryMapBool.value = false;//关闭地图圈选查询
}
const queryMapBool = ref(false);//是否开启地图圈选查询
//地图圈选查询空间统计
const queryMapClick = ()=>{
  //清空查询参数
  clearQueryParams();
  //空间统计查询参数
  chartViewQueryParams.value.province = "";
  chartViewQueryParams.value.city = "";
  chartViewQueryParams.value.county = "";
  chartViewQueryParams.value.provinceId = "";
  chartViewQueryParams.value.cityId = "";
  chartViewQueryParams.value.countyId = "";
  chartViewQueryParams.value.geomText = "";//地图圈选空间数据
  queryMapBool.value = false;//关闭地图圈选查询
  nextTick(() => {
    queryMapBool.value = true;//开启地图圈选查询
  });
}
//关闭空间统计
const hideChartView = (bool)=>{
  //关闭空间统计
  chartViewQueryParams.value.showBool = bool;
}
//是否显示抗震能力分布图层
const showSeismicCapacityDistributionBool = ref(false);
//抗震能力分布图层图例范围
const capacityLegendData = ref([
  {code:"0",name:"0-0.3",color:"rgba(255,0,0,0.7)"},
  {code:"1",name:"0.3-0.6",color:"rgba(255,115,0,0.7)"},
  {code:"2",name:"0.6-0.7",color:"rgba(255,203,0,0.7)"},
  {code:"3",name:"0.7-0.8",color:"rgba(211,248,0,0.7)"},
  {code:"4",name:"0.8-0.9",color:"rgba(128,246,0,0.7)"},
  {code:"5",name:"0.9-1.0",color:"rgba(17,241,5,0.7)"},
]);
const chartMapData = ref([]);
//统计抗震能力地图显示结果
const showChartMapData = (data)=>{
  if(data!=null){
    chartMapData.value = data;
    //显示抗震能力分布图层图例
    showSeismicCapacityDistributionBool.value = true;
  }else{
    chartMapData.value = [];
    //隐藏抗震能力分布图层图例
    showSeismicCapacityDistributionBool.value = false;
  }
}
//地图传参--end

/** 查询建筑物单体列表 */
function getList() {
  loading.value = true;
	listSingle(queryParams.value).then(response => {
		if(response.data){
			singleList.value = response.data.rows;
	    total.value = response.data.total;
		}
	    
	    loading.value = false;
	});
}

/** 查询建筑物单体地图列表 */
function getMapList() {
  //地图查询全部建筑物单体数据列表
  mapAllListBuilding().then((response) => {
    nextTick(() => {
      allListData.value = response.data;
      // completeRefreshSingleBuilding.value = true;//防止地图刷新后不显示
    });
  });
}

// 取消按钮
function cancel() {
  open.value = false;
	isShowCheckIMg.value = false
}

// 表单重置
function reset() {
  form.value = {
    id: null,
    taskCode: null,
    taskName: null,
    buildCode: null,
    province: null,
    city: null,
    county: null,
    country: null,
    longitude: null,
    latitude: null,
    intensity: null,
    buildYears: null,
    purpose: null,
    layerNum: null,
    height: null,
    terrainConditions: null,
    planarRule: null,
    foundationCondition: null,
    verticalRule: null,
    roofComponent: null,
    roofComponentOther: null,
    housingCondition: null,
    degreeDescription: null,
    buildingStructure: null,
    seismicCapacity: null,
    remarks: null,
    picture: null,
    preparer: null,
    fillingTime: null,
    highStructureType: null,
    steelStructureType: null,
    steelStructureTypeOther: null,
    hntConnectionType: null,
    hntStairsPosition: null,
    hntColumnSectionSize: null,
    hntBeamSectionSize: null,
    hntWeakLink: null,
    hntMaxColumnCpacing: null,
    hntMaximumFloorHeight: null,
    hntMaxSpanSeam: null,
    zhFloorType: null,
    zhFloorTypeOther: null,
    zhRoofType: null,
    zhRoofTypeOther: null,
    zhWallMaterials: null,
    zhWallThicknessInterior: null,
    zhWallThicknessExterior: null,
    zhMortarType: null,
    zhMortarStrength: null,
    zhBearingSystem: null,
    zhBearingMode: null,
    zhStaircaseLocation: null,
    zhHoleCrner: null,
    zhStructuralColumn: null,
    zhStructuralColumnOther: null,
    zhRingBeam: null,
  	zhRingBeamOther: null,
    zmRoofType: null,
    zmRoofTypeOther: null,
    zmWallMaterials: null,
    zmMortar: null,
    zmBearingSystem: null,
    zmWallOpeningArea: null,
    zmStructuralColumn: null,
    zmStructuralColumnOther: null,
    zmRingBeam: null,
  	zmRingBeamOther: null,
    soilHardMountain: null,
    soilWall: null,
    soilModeType: null,
    soilModeTypeOther: null,
    soilWallRingBeam: null,
    soilWallDuctileMaterial: null,
    soilDoorWindowWidth: null,
    soilMaxSpacing: null,
    soilRoofForm: null,
    soilRoofingMaterials: null,
    soilRoofTyingMeasures: null,
    woodStructureType: null,
    woodColumnsBracing: null,
    woodColumnExtension: null,
    woodNode: null,
    woodTipDiameter: null,
    woodFoundationAnchoring: null,
    woodGableWall: null,
    woodEnclosureWall: null,
    woodWallConnection: null,
    stoneWallMaterials: null,
    stoneWallMaterialsOther: null,
    stoneLoadMode: null,
    stoneFloorStructure: null,
    stoneRoofType: null,
    stoneRoofTypeOther: null,
    stoneMaximumSpacing: null,
    stoneWallOpeningArea: null,
    stoneWallConnection: null,
    stoneRingBeam: null,
    stoneFourStructural: null,
    isSubmit: null,
    delFlag: null,
    createUser: null,
    createTime: null,
    submitter: null,
    submitTime: null,
		pictureList: []
  };
  proxy.resetForm("singleRef");
}

/** 搜索按钮操作 */
function handleQuery() {
  queryParams.value.page = 1;
  queryParams.value.startTime = submitTime.value? submitTime.value[0] : "";
  queryParams.value.endTime = submitTime.value? submitTime.value[1] : "";
  getList();
}

/** 重置按钮操作 */
function resetQuery() {
	submitTime.value = [];
	cityData.value = [];
	areaData.value = [];
  proxy.resetForm("queryRef");
  handleQuery();
}

// 多选框选中数据
function handleSelectionChange(selection) {
  ids.value = selection.map(item => item.id);
}
const selectable = row => {
	if(row.taskStatus!=2 && row.flag==2){
		return true
	}else{
		return false
	}
}
// 批量删除
const batchDelete = () => {
	proxy.$modal.confirm(`确认是否删除此${ids.value.length}条数据？`).then(function() {
		return delSingle(ids.value.join(','))
	}).then(() => {
		proxy.$modal.msgSuccess("删除成功");
		queryParams.value.page = 1;
		getList();
	}).catch(function() { });
}

/** 新增按钮操作 */
function handleAdd() {
  reset();
  open.value = true;
  title.value = "添加建筑物单体";
}

function chooseStructure(value) {
	isShowZhStructuralColumnOther.value = false;
  isShowZhRingBeamOther.value = false;
  isShowMaterialsOther.value = false;
  isShowZmRoofTypeOther.value = false;
  isShowZmStructuralColumnOther.value = false;
  isShowZmRingBeamOther.value = false;
  isShowRoofType.value = false;
  isShowSteelStructureTypeOther.value = false;
  isShowZhFloorTypeOther.value = false;
  isShowZhRoofTypeOther.value = false;
  isShowSoilModeTypeOther.value = false;
	if(value == "0"){
		/*高层建筑:0*/
		high.value = true
		steel.value = false
		multilayer.value = false		
		brick.value = false
		brickWood.value = false
		soil.value = false
		wood.value = false
		stone.value = false
	}else if(value == "1"){
		high.value = false
		steel.value = true
		multilayer.value = false		
		brick.value = false
		brickWood.value = false
		soil.value = false
		wood.value = false
		stone.value = false
	}else if(value == "2"){
		high.value = false
		steel.value = false
		multilayer.value = true
		brick.value = false
		brickWood.value = false
		soil.value = false
		wood.value = false
		stone.value = false
	}else if(value == "3"){
		high.value = false
		steel.value = false
		multilayer.value = false
		brick.value = true
		brickWood.value = false
		soil.value = false
		wood.value = false
		stone.value = false
	}else if(value == "4"){
		high.value = false
		steel.value = false
		multilayer.value = false
		brick.value = false
		brickWood.value = true
		soil.value = false
		wood.value = false
		stone.value = false
	}else if(value == "5"){
		high.value = false
		steel.value = false
		multilayer.value = false
		brick.value = false
		brickWood.value = false
		soil.value = true
		wood.value = false
		stone.value = false
	}else if(value == "6"){
		high.value = false
		steel.value = false
		multilayer.value = false
		brick.value = false
		brickWood.value = false
		soil.value = false
		wood.value = true
		stone.value = false
	}else if(value == "7"){
		high.value = false
		steel.value = false
		multilayer.value = false
		brick.value = false
		brickWood.value = false
		soil.value = false
		wood.value = false
		stone.value = true
	}else if(value == "8"){
		/*其他:8*/
		high.value = false
		steel.value = false
		multilayer.value = false
		brick.value = false
		brickWood.value = false
		soil.value = false
		wood.value = false
		stone.value = false
	}
}

/** 修改按钮操作 */
function handleUpdate(row) {
  reset();
  isShow.value = true;
  isEditFile.value = false;
  isShowMaterialsOther.value = false;
  isShowRoofType.value = false;
  high.value = false
	steel.value = false
	multilayer.value = false
	brick.value = false
	brickWood.value = false
	soil.value = false
	wood.value = false
	stone.value = false
  getDictData(row);
  const id = row.id || ids.value
  getSingle(id).then(response => {
    form.value = response.data.data;
    form.value.pictureList = response.data.picture;
		form.value.specifyPicture = response.data.data.specifyPicture && response.data.data.specifyPicture.split(',')
    open.value = true;
    title.value = "修改建筑物单体";    
    if(response.data.data.roofComponent =="其他"){
    	/*出屋面构件*/
    	isShowRoofComponentOther.value = true
    }
    if(response.data.data.buildingStructure =="0"){
    	/*高层建筑:0*/
    	high.value = true
    }else if(response.data.data.buildingStructure =="1"){
    	/*钢结构:1*/
    	steel.value = true
    }else if(response.data.data.buildingStructure =="2"){
    	/*多层钢筋混凝土结构:2*/
    	multilayer.value = true
    }else if(response.data.data.buildingStructure =="3"){
    	/*砖混结构:3*/
    	brick.value = true
    }else if(response.data.data.buildingStructure =="4"){
    	/*砖木结构:4*/
    	brickWood.value = true
    }else if(response.data.data.buildingStructure =="5"){
    	/*土结构:5*/
    	soil.value = true
    }else if(response.data.data.buildingStructure =="6"){
    	/*木结构:6*/
    	wood.value = true
    }else if(response.data.data.buildingStructure =="7"){
    	/*石结构:7*/
    	stone.value = true
    }else if(response.data.data.buildingStructure =="8"){
    	/*其他:8*/
    	high.value = false
			steel.value = false
			multilayer.value = false
			brick.value = false
			brickWood.value = false
			soil.value = false
			wood.value = false
			stone.value = false
    }
  });
}

/** 查看按钮操作 */
function handleView(row) {
  reset();
  isShow.value = false;
  isEditFile.value = true;
  isShowMaterialsOther.value = false;
  isShowRoofType.value = false;
  high.value = false
	steel.value = false
	multilayer.value = false
	brick.value = false
	brickWood.value = false
	soil.value = false
	wood.value = false
	stone.value = false
  getDictData(row);
  const id = row.id || ids.value
	isShowCheckIMg.value = true
  getSingle(id).then(response => {
    form.value = response.data.data;
    form.value.pictureList = response.data.picture;
    open.value = true;
    title.value = "查看建筑物单体";
    
    if(response.data.data.buildingStructure =="0"){
    	/*高层建筑:0*/
    	high.value = true
    }else if(response.data.data.buildingStructure =="1"){
    	/*钢结构:1*/
    	steel.value = true
    }else if(response.data.data.buildingStructure =="2"){
    	/*多层钢筋混凝土结构:2*/
    	multilayer.value = true
    }else if(response.data.data.buildingStructure =="3"){
    	/*砖混结构:3*/
    	brick.value = true
    }else if(response.data.data.buildingStructure =="4"){
    	/*砖木结构:4*/
    	brickWood.value = true
    }else if(response.data.data.buildingStructure =="5"){
    	/*土结构:5*/
    	soil.value = true
    }else if(response.data.data.buildingStructure =="6"){
    	/*木结构:6*/
    	wood.value = true
    }else if(response.data.data.buildingStructure =="7"){
    	/*石结构:7*/
    	stone.value = true
    }else if(response.data.data.buildingStructure =="8"){
    	/*其他:8*/
    	high.value = false
			steel.value = false
			multilayer.value = false
			brick.value = false
			brickWood.value = false
			soil.value = false
			wood.value = false
			stone.value = false
    }
    
  });
}

/** 提交按钮 */
function submitForm() {
	const fileList = JSON.parse(JSON.stringify(proxy.$refs["imageUpload"].fileList));
  const attachIds = [];
  for(var i = 0; i<fileList.length;i++) {
	   attachIds.push(fileList[i].attachId)
 	}
  form.value.picture = attachIds.join(",");
  
//switch(form.value.buildingStructure){
//	case '0':
//    
//    break;
//  case '1':
//    
//    break;
//  case '2':
//    
//    break;
//  case '3':
//    
//    break;
//  case '4':
//    
//    break;
//  case '5':
//    
//    break;
//  case '6':
//    
//    break;
//}

	let specifyPicture = ''
	if(proxy.$refs["imageUpload"].checkedImgList.length > 0){
		specifyPicture = proxy.$refs["imageUpload"].checkedImgList.join(',')
	}
  proxy.$refs["singleRef"].validate((valid, fields) => {
    if (valid) {
      if (form.value.id != null) {
				const loading = ElLoading.service({
					lock: true,
					text: '修改中...',
					background: 'rgba(0, 0, 0, 0.7)',
				})
        updateSingle({...form.value, specifyPicture}).then(response => {
          proxy.$modal.msgSuccess("修改成功");
          open.value = false;
          getList();
					loading.close()
        });
      }
    }else{
			proxy.$refs["singleRef"].scrollToField(Object.keys(fields)[0])
		}
  });
}

/** 删除按钮操作 */
function handleDelete(row) {
  const id = row.id || ids.value;
	proxy.$modal.confirm('是否确认删除建筑物单体编号为"' + row.buildCode + '"的数据项？').then(function() {
	    return delSingle(id);
	}).then(() => {
	    getList();
	    proxy.$modal.msgSuccess("删除成功");
	}).catch(() => {});
}

// 模板下载
function importTemplate(name) {
  proxy.download("/base/product/downloadExcel", {
    fileName:name
  }, name);
};

/** 提交上传文件 */
function submitFileForm() {
  proxy.$refs["uploadRef"].submit();
};

/** 打开导入表弹窗 */
function handleImport() {
    upload.title = "导入";
    upload.open = true;
}

/**文件上传前处理 */
function handleFileBeforeUpload(file) {
    proxy.$modal.loading("正在上传文件，请稍候...");
    return true
}

/**文件上传中处理 */
const handleFileUploadProgress = (event, file, fileList) => {
  upload.isUploading = true;
};
// 上传失败
function handleFileUploadError(err) {
  proxy.$modal.closeLoading();
  proxy.$modal.msgError("上传文件失败");
}
/** 文件上传成功处理 */
const handleFileSuccess = (response, file, fileList) => {
  upload.open = false;
  upload.isUploading = false;
  proxy.$modal.closeLoading();
  proxy.$refs["uploadRef"].handleRemove(file);
  proxy.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.message + "</div>", "导入结果", { dangerouslyUseHTMLString: true });
  getList();
};

/** 导出按钮操作 */
function handleExport() {
  proxy.download('/building/exportBuilding', {
    ...queryParams.value
  }, `建筑物单体数据_${new Date().getTime()}.xls`)
}
/*切换标签页*/
function handleClick(tab, event) {
	if(tab.props.name=="first"){
		// getMapList();
	}else{
		getList();
	}
}

// 指定典型房屋结构照片
const isShowCheckIMg = ref(false)
const selectImg = () => {
	isShowCheckIMg.value = !isShowCheckIMg.value
}
const imgUploadSuccess = (id) => {
	form.value.picture = id
	proxy.$refs['singleRef'].clearValidate('picture')
}

onMounted(() => {
  getMapList();
  getProvinceData();
  completeRefreshSingleBuilding.value = true;//防止地图刷新后不显示
})

</script>

<style scoped lang="scss">
.new-closeBtnDiv {
  position: absolute;
  /*right: 50px;*/
  right: 0px;
  bottom:20px;
}
//查询面板
.new-queryDiv{
  position:absolute;
  top:16px;
  left:100px;
  width:358px;
  height:230px;
  background-color:#fff;
  box-shadow: 0px 0px 20px rgba(0,0,0,0.2);
  border:1px solid #707070;
  border-radius: 4px;
}
.new-queryDiv-inner {
  position:absolute;
  top:20px;
  left:30px;
  right:30px;
  bottom:0px;
}
.new-queryBtnDiv {
  position: absolute;
  /*left: 80px;*/
  left: 0px;
  bottom:20px;
}
.new-queryMapBtnDiv {
  position: absolute;
  left: 104px;
  bottom:20px;
}

/*抗震能力分布图层图例*/
.new-capacityLegendDiv {
  position: absolute;
  bottom: 0px;
  right: 0px;
  width: 170px;
  background: #fff;
  box-shadow: 0px 0px 20px rgb(0 0 0 / 20%);
  border: 1px solid #707070;
  border-radius: 4px;
  padding: 5px;
}
.new-capacityLegendDiv div {
  position: relative;
  height: 16px;
  line-height: 16px;
  font-size: 13px;
  margin: 8px;
}
.new-capacityLegendDiv div span {
  line-height: 16px;
  font-size: 13px;
}
.new-capacityLegendDiv div div {
  position: relative;
  top: 2px;
  left: 8px;
  width: 30px;
  height: 14px;
  margin: 0px !important;
  margin-right: 25px !important;
  display: inline-block;
}

/*面*/
.new-legendDiv-polygon {
  position: relative !important;
  left: 0px !important;
  top: 0px !important;
  border:1px solid black;
  background:#fff;
}
:deep(.el-form-item__content){
	align-items: start!important
}
</style>
